Headers already sent.

Gestart doorDesire20 reacties120 weergaven

21 berichten · pagina 1 van 2

Desire

Lid · Topicstarter

Berichten
4.367
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Hallo,

Ik zit weer met een kleine fout alleen ik weet niet hoe ik deze moet oplossen.

fout:

Warning: Cannot modify header information - headers already sent by (output started at /home/owner/domains/paypal-winnen.nl/public_html/pagina/login.php:40) in /home/owner/domains/paypal-winnen.nl/public_html/pagina/login.php on line 159


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Paypal-Winnen - Hoe simpel kan het zijn.</title>
<meta name="copyright" content="Brush-Design" />
<meta name="author" content="Brush-Design" />
<link href="css/index.css" rel="stylesheet" type="text/css" />
<link href="css/menu.css" rel="stylesheet" type="text/css" />
</head>

<body>

<div id="container">
    
    <div id="logo">
    </div>
    
    <div id="menu">
        <ul>
            <li><a href="index.php">Home</a></li>
            <li><a href="?p=about">Over ons</a></li>
            <li><a href="?p=login" style="text-shadow: 1px 1px #000; color: #c1c1c1;">Inloggen</a></li>
            <li><a href="?p=registreren">Registreren</a></li>
            <li><a href="?p=contact">Contact</a></li>
        </ul>
    </div>    
    
    <div class="clear"></div>
    
    <div id="submenu">
        <div id="submenu_top"> 
            <div class="submenu_top_tekst">
                Menu 
            </div>
        </div>
        <div id="submenu_mid">
            <ul>
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]login[/COLOR][COLOR= #007700]]))
{[/COLOR]
    [COLOR= #0000BB]$sql[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM users WHERE id = "[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]login[/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
    [COLOR= #0000BB]$fetch[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$sql[/COLOR][COLOR= #007700]);[/COLOR]
    
?>
                <li><a href="?p=enquetes">Enquetes bekijken</a></li>
                <li><a href="?p=wijzigww">Wachtwoord wijzigen</a></li>
                
                    <div class="hrlijn"></div>
                
                <li><a href="?p=about">Over ons</a></li>
                <li><a href="?p=contact">Contact</a></li>
                
                    <div class="hrlijn"></div>
                
                <li><a href="?p=faq">FAQ</a></li>
                <li><a href="?p=av">Algemene Voorwaarden</a></li>
                <li><a href="?p=pv">Privacy Voorwaarden</a></li>
                
                    <div class="hrlijn"></div>
                
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$fetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]adminl[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]1[/COLOR][COLOR= #007700])
{[/COLOR]
?>
                <li><a href="?p=a_home">Admin Home</a></li>
[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #007700]}[/COLOR]
?>
                <li><a href="?p=loguit">Uitloggen</a></li>
[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #007700]}[/COLOR]
[URL="http://www.php.net/else"]else[/URL]
[COLOR= #007700]{[/COLOR]
?>
                <li><a href="?p=login" style="color: #404040">Inloggen</a></li>
                <li><a href="?p=registreren">Registreren</a></li>
                
                    <div class="hrlijn"></div>
                
                <li><a href="?p=about">Over ons</a></li>
                <li><a href="?p=contact">Contact</a></li>
                
                    <div class="hrlijn"></div>
                
                <li><a href="?p=faq">FAQ</a></li>
                <li><a href="?p=av">Algemene Voorwaarden</a></li>
                <li><a href="?p=pv">Privacy Voorwaarden</a></li>
                
[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #007700]}[/COLOR]
?>
            </ul>
        </div>
        <div id="submenu_bottom"></div>
    </div>
    
    <div id="content">
        <div id="content_top"> 
            <div class="content_top_tekst">
                Home 
            </div>
        </div>
        <div id="content_mid">
            <div class="content_mid_tekst">
            [COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700](![/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]login[/COLOR][COLOR= #007700]]))
{[/COLOR]
    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]submit[/COLOR][COLOR= #007700]]))
    {[/COLOR]
        [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]mail[/COLOR][COLOR= #007700]]) ||[/COLOR] [URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]pass[/COLOR][COLOR= #007700]]))
        {[/COLOR]
            [COLOR= #0000BB]$arrFout[/COLOR][COLOR= #007700][] =[/COLOR] [COLOR= #DD0000]Je hebt niet alles ingevuld.[/COLOR][COLOR= #007700];
        }[/COLOR]
        [URL="http://www.php.net/else"]else[/URL]
        [COLOR= #007700]{[/COLOR]
            [COLOR= #0000BB]$check[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM users WHERE mail = "[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]mail[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]
            [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$check[/COLOR][COLOR= #007700]) ==[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700])
            {[/COLOR]
                [COLOR= #0000BB]$arrFout[/COLOR][COLOR= #007700][] =[/COLOR] [COLOR= #DD0000]Dit email adres is niet bij ons bekend.[/COLOR][COLOR= #007700];
            }[/COLOR]
            [URL="http://www.php.net/else"]else[/URL]
            [COLOR= #007700]{[/COLOR]
                [COLOR= #0000BB]$fetch[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$check[/COLOR][COLOR= #007700]);[/COLOR]
                [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$fetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]pass[/COLOR][COLOR= #007700]] !=[/COLOR] [URL="http://www.php.net/md5"]md5[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]pass[/COLOR][COLOR= #007700]]))
                {[/COLOR]
                    [COLOR= #0000BB]$arrFout[/COLOR][COLOR= #007700][] =[/COLOR] [COLOR= #DD0000]Het wachtwoord klopt niet.[/COLOR][COLOR= #007700];
                }[/COLOR]
                [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$fetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]actief[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700])
                {[/COLOR]
                    [COLOR= #0000BB]$arrFout[/COLOR][COLOR= #007700][] =[/COLOR] [COLOR= #DD0000]U heeft uw account nog niet geactiveerd. Check uw mailbox (ook uw spam).<br />Niet gehad? klik <a href="?p=ao">hier</a> voor nog een mail.[/COLOR][COLOR= #007700];
                }[/COLOR]
                [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$fetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]banned[/COLOR][COLOR= #007700]] !=[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700])
                {[/COLOR]
                    [COLOR= #0000BB]$arrFout[/COLOR][COLOR= #007700][] =[/COLOR] [COLOR= #DD0000]U bent verbannen.[/COLOR][COLOR= #007700];
                }
            }
        }[/COLOR]
        
        [COLOR= #0000BB]$arrFout[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000][/COLOR][COLOR= #007700];[/COLOR]
        [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$arrFout[/COLOR] [COLOR= #007700]!=[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700])
        {[/COLOR]
            [URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000]<strong>Er is een fout opgetreden:</strong><br />[/COLOR][COLOR= #007700];[/COLOR]
            [URL="http://www.php.net/foreach"]foreach[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$arrFout[/COLOR] [COLOR= #007700]as[/COLOR] [COLOR= #0000BB]$val[/COLOR][COLOR= #007700])
            {[/COLOR]
                [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$val[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #DD0000]<br />[/COLOR][COLOR= #007700];
            }[/COLOR]
            [URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000]<br />[/COLOR][COLOR= #007700];
        }[/COLOR]
        [URL="http://www.php.net/else"]else[/URL]
        [COLOR= #007700]{[/COLOR]
            [COLOR= #0000BB]$query2[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM users WHERE mail = "[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]mail[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
            [COLOR= #0000BB]$fetch2[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$query2[/COLOR][COLOR= #007700]);[/COLOR]
            [COLOR= #0000BB]$user[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$fetch2[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]];[/COLOR]
            [COLOR= #0000BB]$code[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/md5"]md5[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/microtime"]microtime[/URL][COLOR= #007700]());[/COLOR]
            [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"INSERT INTO logins (user, code, ip) VALUES ("[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$user[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #DD0000]", "[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$code[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #DD0000]", "[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REMOTE_ADDR[/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #DD0000]")"[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
            [COLOR= #0000BB]$dagen[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]365[/COLOR][COLOR= #007700];[/COLOR]
            [URL="http://www.php.net/setcookie"]setcookie[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]usercode[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$code[/COLOR][COLOR= #007700],[/COLOR] [URL="http://www.php.net/time"]time[/URL][COLOR= #007700]()+[/COLOR][COLOR= #0000BB]60[/COLOR][COLOR= #007700]*[/COLOR][COLOR= #0000BB]60[/COLOR][COLOR= #007700]*[/COLOR][COLOR= #0000BB]24[/COLOR][COLOR= #007700]*[/COLOR][COLOR= #0000BB]$dagen[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]/[/COLOR][COLOR= #007700]);[/COLOR]
            [URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000]U bent ingelogd. klik <a href="index.php">hier</a> om door te gaan.<br />[/COLOR][COLOR= #007700];
        }
    }[/COLOR]
?>
<form name="login" method="POST" action="">
    <table>
        <tr>
            <td><strong>Email adres:</strong></td><td><input type="text" name="mail" /></td>
        </tr>
        <tr>
            <td><strong>Wachtwoord:</strong></td><td><input type="password" name="pass" /></td>
        </tr>
        <tr>
            <td><input type="submit" name="submit" value="Inloggen" /></td>
        </tr>
    </table>
</form>
<a href="?p=wwvergeten">Wachtwoord vergeten?</a>
[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #007700]}[/COLOR]
[URL="http://www.php.net/else"]else[/URL]
[COLOR= #007700]{[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000]Je bent al ingelogd.[/COLOR][COLOR= #007700];
}[/COLOR]
?>
            </div>
        </div>
        <div id="content_bottom"></div>
    </div>
    
    <div id="advertentie">
        <div id="advertentie_top"> 
            <div class="advertentie_top_tekst">
                Advertentie 
            </div>
        </div>
        <div id="advertentie_mid">
            <div class="advertentie_mid_tekst">
                <a href="http://ds1.nl/c/?wi=175715&si=1064&li=70441&ws=" target="_blank">
                    <img src="http://b.ds1.nl/1064/70441/index.php?wi=175715&si=1064&li=70441&ws=" alt="" style="border:none;" />
                </a>
            </div>
        </div>
        <div id="advertentie_bottom"></div>
    </div>
    
    <div id="klanten">
        <div id="klanten_top"> 
            <div class="klanten_top_tekst">
                Tevreden Klanten 
            </div>
        </div>
        <div id="klanten_mid">
            <div class="klanten_mid_tekst">
                <b>P. Willems zegt:</b> <i>"Goede en snelle service, binnen een week succesvol mijn paypal ontvangen, top!"</i>
                
                <br><br>
                
                <b>J. Bakker zegt:</b> <i>"Ik heb &euro;5 gekregen binnen een week, bedankt."</i>
                
                <br><br>
                
                <b>M. Kallenkoot zegt:</b> <i>"Ik ben de 10de invuller, heb een mail gestuurt en binnen een week mijn paypal ontvangen. +1"</i>
                
            </div>
        </div>
        <div id="klanten_bottom"></div>
    </div>
    
    <div id="footer">
        &copy; Copyright 2012 - Alle rechten Voorbehouden - Design & slicing by http://brush-design.nl
    </div>
       
</div>
       
</body>
</html>


Wie kan mij helpen?

Mvg,
Desire
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
En dan denk je niet:
- Laat ik eens wat relevante code tonen?
- Laat ik eens Googlen?

Anyway, het komt doordat je HTML voor de setcookie() heb staan, en dat mag niet.
Dus pas je script aan en laat de logisch VOOR je HTML plaatsvinden.
0
Desire

Lid · Topicstarter

Berichten
4.367
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ja maar als ik de php code boven de html zet, dan krijg ik alle echo`s etc. apart in een wit venster. En het moet gewoon in de content blijven.
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
Dan moet je de logica erop aanpassen..
0
Berichten
38
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Headers moeten altijd geplaatst worden boven de tag.
(Daarmee bedoel ik de header() functie in php)
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
Boven de doctype zelfs, boven alles wat maar output is...

En niet alleen header() maar ook setcookie()
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
Je zou OB kunnen gebruiken maar dat raden mensen *aarclay* af yummie
// Weet alleen niet meer waarom emo
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
Nielsie schreef:
Je zou OB kunnen gebruiken maar dat raden mensen *aarclay* af yummie
Juist, die zijn voor vrouwen.
0
Berichten
8.602
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Aarclay schreef:
Eerdere citaten tonen
Nielsie schreef:
Je zou OB kunnen gebruiken maar dat raden mensen *aarclay* af yummie
Juist, die zijn voor vrouwen.
emo haha

ob gebruik je alleen als je niet kan programmeren
0
Berichten
35.796
Reputatie
1
Punten
0,00
Lid sinds
Laatst gezien
Nielsie schreef:
// Weet alleen niet meer waarom emo
Omdat je problemen moet oplossen ipv pleistertje erop drukken zodat je uiteindelijk niet met een script vol pleistertjes zit wat bij de eerste tik uit elkaar knalt ipv een script dat gewoon goed is.
0
Desire

Lid · Topicstarter

Berichten
4.367
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Kan iemand het voor mij doen,heb haast sadley
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
Desire schreef:
Kan iemand het voor mij doen,heb haast sadley
ja hoor, vast wel. Daarvoor is het Aanvragen-forum. Of anders kan je het toch doen als je geen haast hebt?
toevoeging op 13 oktober 2012, 19:27:21:
Lennard schreef:
Eerdere citaten tonen
Nielsie schreef:
// Weet alleen niet meer waarom emo
Omdat je problemen moet oplossen ipv pleistertje erop drukken zodat je uiteindelijk niet met een script vol pleistertjes zit wat bij de eerste tik uit elkaar knalt ipv een script dat gewoon goed is.
...en je dus de output van het hele script onnodig in het geheugen buffert, terwijl dat nergens voor nodig is.
0
Desire

Lid · Topicstarter

Berichten
4.367
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Aarclay schreef:
Eerdere citaten tonen
Desire schreef:
Kan iemand het voor mij doen,heb haast sadley
ja hoor, vast wel. Daarvoor is het Aanvragen-forum. Of anders kan je het toch doen als je geen haast hebt?
Ja maar het probleem is wat je net zei, dat je het boven de doctype moet zetten,maar als ik dat doe, dan komen al die errors en echo`s bovenaan de site, en ik heb geen flauw idee hoe ik alleen het nodige boven de doctype zet.
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
Dan klopt de logica niet. Je kan die errors toch in een variabele/array zetten, en die in je layout tonen?
0
Desire

Lid · Topicstarter

Berichten
4.367
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Laat maar heb nu geen tijd meer, ik maak morgen wel een ander topic, toch bedankt.
0

Jouw reactie

Deel je idee, stel een vraag of help een ander verder.

Editor laden…

Praat mee met de One2xs-community.

Inloggen om te reageren