Inlog gedeelte doet het niet:S

Gestart doorFreestyle11 reacties11 weergaven

12 berichten · pagina 1 van 1

Freestyle

Lid · Topicstarter

Berichten
7.681
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ik ben bezig met een ledensysteempje, voor me website. maar als ik inlog doet hij het niet.
ik krijg geen error niks.

login.php
Spoiler tonen
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/session_start"]session_start[/URL][COLOR= #007700]();[/COLOR]
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]config.php[/COLOR][COLOR= #007700]);[/COLOR]
top[COLOR= #007700]();[/COLOR]
heat[COLOR= #007700]();[/COLOR]
menu[COLOR= #007700]();[/COLOR]
nav[COLOR= #007700]();[/COLOR]
news[COLOR= #007700]();[/COLOR]


[COLOR= #0000BB]$query[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM users WHERE username = "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]username[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]" AND password = "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]password[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR] [COLOR= #FF8000]// Met deze query halen we de data uit de database, met de opgevraagde POST-data[/COLOR]
[COLOR= #0000BB]$data[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$query[/COLOR][COLOR= #007700]);[/COLOR] [COLOR= #FF8000]// Hiermee halen we, als we succesvol zijn ingelogd, data op van de gebruiker met de bijbehoorende POST-data[/COLOR]

[COLOR= #0000BB]$num[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$query[/COLOR][COLOR= #007700]);[/COLOR] [COLOR= #FF8000]// Met deze query controleren we de login, dus de POST-data username, en password, of er in de tabel overeenkomsten zijn.[/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]sumbit[/COLOR][COLOR= #007700]]))[/COLOR] [COLOR= #FF8000]// Controleer of er op de login-button is geklikt.[/COLOR]
[COLOR= #007700]{[/COLOR]
    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$num[/COLOR] [COLOR= #007700]<[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700])[/COLOR] [COLOR= #FF8000]// Gebruiker niet ingelogd, mogelijk verkeerde combinatie van username, en password[/COLOR]
    [COLOR= #007700]{[/COLOR]
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Gebruikersusername-/password komen niet overeen, probeer het opnieuw.[/COLOR][COLOR= #007700];
    }[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]
        [COLOR= #FF8000]// Gebruiker is ingelogd, nu maken we wat sessies van de gebruikte, en komende variablen, zodat je die later weer kan opvragen.[/COLOR]
        [COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]] =[/COLOR] [COLOR= #0000BB]$data[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]];[/COLOR]
        [COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]username[/COLOR][COLOR= #007700]] =[/COLOR] [COLOR= #0000BB]$data[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]username[/COLOR][COLOR= #007700]];[/COLOR]
        
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Welkom ingelogd, <strong>[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$data[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]username[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]</strong>.[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #FF8000]// Weergeef een welkoms bericht[/COLOR]
    [COLOR= #007700]}
    
}[/COLOR]

?>


 <div id="center">
      <h1><div align="center">Login pagina</div></h1>
          <div class="text">
                 <span>Log hier snel en veilig in op [COLOR= #0000BB]<?[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$web_username[/COLOR][COLOR= #007700];[/COLOR] ?>.</span>
        </div>
        <div class="text">
            <img src="images/login.png" class="img" width="120" height="90" alt="" />
            <p>
            <form action="<?=$_SERVER[PHP_SELF];?>" method="post">
            <table border="1px" cellpadding="0">
            <tr><td>Gebruikersnaam:</td><td><input type="text" name="username" /></td></tr>
            <tr><td>Wachtwoord:</td><td><input type="password" name="password" /></td></tr>
            <tr><td><input type="button" name="sumbit" value="login" /></td><td>&nbsp;</td></tr>
            </table>
            </form>
            </p>


            <br /><br /><br />
            <h1><div align="center">Nog niet aangemeld?</div></h1>
                <div class="text">
                     <span>Registreer je gratis en snel in bij [COLOR= #0000BB]<?[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$web_username[/COLOR][COLOR= #007700];[/COLOR] ?>.</span>
                 </div>
                 <br />
             <p>
             Klik op de link om je zelf te registreren <a href="aanmelden.php">Klik hier</a>.<br />
             Indien u al een lid ben, is dit niet voor toepassing voor u. 
             </p>
                          </div>
                        </div>

[COLOR= #0000BB]<?php[/COLOR]
foot[COLOR= #007700]();[/COLOR]
?>
alvast bedankt.
als er nog iets bij moet van code dan hoor ik het wel
0
Berichten
2.609
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Plaats dit er eens in:

[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #FF8000]// Zet error reporting aan. Weergeef alle meldingen, behalve E_NOTICE.[/COLOR]
[URL="http://www.php.net/error_reporting"]error_reporting[/URL][COLOR= #007700]([/COLOR]E_ALL [COLOR= #007700]^[/COLOR] E_NOTICE[COLOR= #007700]);[/COLOR]
 
[COLOR= #FF8000]// Zet error reporting aan in de ini.[/COLOR]
[URL="http://www.php.net/ini_set"]ini_set[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]error_reporting[/COLOR][COLOR= #007700],[/COLOR] E_ALL[COLOR= #007700]);[/COLOR]
?>


Zie het meer in topics. Dus probeer het eens.
0
Freestyle

Lid · Topicstarter

Berichten
7.681
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
dan krijg ik nog geen errors en hij doet het nog steeds niet.

licht het misschien aan xampp? (heb het op localhosT)
0
Berichten
2.609
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Probeer het eens op een andere host?
0
Freestyle

Lid · Topicstarter

Berichten
7.681
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
zal ik doen, ik edit me post wel als er niet weer is gereageert

edit///
nu krijg ik deze errors:

Notice: Undefined index: username in /home/project/domains/script.host2earn.nl/public_html/login.php on line 18

Notice: Undefined index: password in /home/project/domains/script.host2earn.nl/public_html/login.php on line 18


mijn code is:
login.php
Spoiler tonen
[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #FF8000]// Zet error reporting aan. Weergeef alle meldingen, behalve E_NOTICE.[/COLOR]
[URL="http://www.php.net/error_reporting"]error_reporting[/URL][COLOR= #007700]([/COLOR]E_ALL [COLOR= #007700]^[/COLOR] E_NOTICE[COLOR= #007700]);[/COLOR]
 
[COLOR= #FF8000]// Zet error reporting aan in de ini.[/COLOR]
[URL="http://www.php.net/ini_set"]ini_set[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]error_reporting[/COLOR][COLOR= #007700],[/COLOR] E_ALL[COLOR= #007700]);[/COLOR]


[URL="http://www.php.net/session_start"]session_start[/URL][COLOR= #007700]();[/COLOR]
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]config.php[/COLOR][COLOR= #007700]);[/COLOR]
top[COLOR= #007700]();[/COLOR]
heat[COLOR= #007700]();[/COLOR]
menu[COLOR= #007700]();[/COLOR]
nav[COLOR= #007700]();[/COLOR]
news[COLOR= #007700]();[/COLOR]


[COLOR= #0000BB]$query[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM users WHERE username = "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]username[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]" AND password = "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]password[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR] [COLOR= #FF8000]// Met deze query halen we de data uit de database, met de opgevraagde POST-data[/COLOR]
[COLOR= #0000BB]$data[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$query[/COLOR][COLOR= #007700]);[/COLOR] [COLOR= #FF8000]// Hiermee halen we, als we succesvol zijn ingelogd, data op van de gebruiker met de bijbehoorende POST-data[/COLOR]

[COLOR= #0000BB]$num[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$query[/COLOR][COLOR= #007700]);[/COLOR] [COLOR= #FF8000]// Met deze query controleren we de login, dus de POST-data username, en password, of er in de tabel overeenkomsten zijn.[/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]sumbit[/COLOR][COLOR= #007700]]))[/COLOR] [COLOR= #FF8000]// Controleer of er op de login-button is geklikt.[/COLOR]
[COLOR= #007700]{[/COLOR]
    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$num[/COLOR] [COLOR= #007700]<[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700])[/COLOR] [COLOR= #FF8000]// Gebruiker niet ingelogd, mogelijk verkeerde combinatie van username, en password[/COLOR]
    [COLOR= #007700]{[/COLOR]
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Gebruikersusername-/password komen niet overeen, probeer het opnieuw.[/COLOR][COLOR= #007700];
    }[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]
        [COLOR= #FF8000]// Gebruiker is ingelogd, nu maken we wat sessies van de gebruikte, en komende variablen, zodat je die later weer kan opvragen.[/COLOR]
        [COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]] =[/COLOR] [COLOR= #0000BB]$data[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]];[/COLOR]
        [COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]username[/COLOR][COLOR= #007700]] =[/COLOR] [COLOR= #0000BB]$data[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]username[/COLOR][COLOR= #007700]];[/COLOR]
        
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Welkom ingelogd, <strong>[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$data[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]username[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]</strong>.[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #FF8000]// Weergeef een welkoms bericht[/COLOR]
    [COLOR= #007700]}
    
}[/COLOR]

?>


 <div id="center">
      <h1><div align="center">Login pagina</div></h1>
          <div class="text">
                 <span>Log hier snel en veilig in op [COLOR= #0000BB]<?[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$web_naam[/COLOR][COLOR= #007700];[/COLOR] ?>.</span>
        </div>
        <div class="text">
            <img src="images/login.png" class="img" width="120" height="90" alt="" />
            <p>
            <form action="<?=$_SERVER[PHP_SELF];?>" method="post">
            <table border="1px" cellpadding="0">
            <tr><td>Gebruikersnaam:</td><td><input type="text" name="username" /></td></tr>
            <tr><td>Wachtwoord:</td><td><input type="password" name="password" /></td></tr>
            <tr><td><input type="button" name="sumbit" value="login" /></td><td>&nbsp;</td></tr>
            </table>
            </form>
            </p>


            <br /><br /><br />
            <h1><div align="center">Nog niet aangemeld?</div></h1>
                <div class="text">
                     <span>Registreer je gratis en snel in bij [COLOR= #0000BB]<?[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$web_naam[/COLOR][COLOR= #007700];[/COLOR] ?>.</span>
                 </div>
                 <br />
             <p>
             Klik op de link om je zelf te registreren <a href="aanmelden.php">Klik hier</a>.<br />
             Indien u al een lid ben, is dit niet voor toepassing voor u. 
             </p>
                          </div>
                        </div>

[COLOR= #0000BB]<?php[/COLOR]
foot[COLOR= #007700]();[/COLOR]
?>
database code:
Spoiler tonen
CREATE TABLE `users` (
`id` INT( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`username` VARCHAR( 80 ) NOT NULL ,
`password` VARCHAR( 80 ) NOT NULL
) ENGINE = MYISAM ;
ik snap de code ook nietconfused
0
Janm

Lid

Berichten
6.170
Reputatie
1
Punten
0,00
Lid sinds
Laatst gezien
$query = mysql_query("SELECT * FROM users WHERE username = ".$_POST[username]
De kolom username bestaat niet. Net als password. Heb je de sql geupload?
0
Freestyle

Lid · Topicstarter

Berichten
7.681
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
ja tuurlijk.
met de sql code die hier boven staat. daarom snap ik de error ook niet.
0
Janm

Lid

Berichten
6.170
Reputatie
1
Punten
0,00
Lid sinds
Laatst gezien
Config of iets degelijks goed ingesteld?
0
Berichten
2.609
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
De fout zit op LIJN 18 Niet in de config emo
0
Freestyle

Lid · Topicstarter

Berichten
7.681
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
ja, heb het ook 10000000x na gekeken op e.v.t spellings fouten. maar dat is allemaal niet zoconfused
0
Berichten
6.722
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #FF8000]// Zet error reporting aan. Weergeef alle meldingen, behalve E_NOTICE.[/COLOR]
[URL="http://www.php.net/error_reporting"]error_reporting[/URL][COLOR= #007700]([/COLOR]E_ALL [COLOR= #007700]^[/COLOR] E_NOTICE[COLOR= #007700]);[/COLOR]
 
[COLOR= #FF8000]// Zet error reporting aan in de ini.[/COLOR]
[URL="http://www.php.net/ini_set"]ini_set[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]error_reporting[/COLOR][COLOR= #007700],[/COLOR] E_ALL[COLOR= #007700]);[/COLOR]


[URL="http://www.php.net/session_start"]session_start[/URL][COLOR= #007700]();[/COLOR]
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]config.php[/COLOR][COLOR= #007700]);[/COLOR]
top[COLOR= #007700]();[/COLOR]
heat[COLOR= #007700]();[/COLOR]
menu[COLOR= #007700]();[/COLOR]
nav[COLOR= #007700]();[/COLOR]
news[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]sumbit[/COLOR][COLOR= #007700]]))[/COLOR] [COLOR= #FF8000]// Controleer of er op de login-button is geklikt.[/COLOR]
[COLOR= #007700]{[/COLOR]
[COLOR= #0000BB]$query[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM users WHERE username = "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]username[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]" AND password = "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]password[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR] [COLOR= #FF8000]// Met deze query halen we de data uit de database, met de opgevraagde POST-data[/COLOR]
[COLOR= #0000BB]$data[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$query[/COLOR][COLOR= #007700]);[/COLOR] [COLOR= #FF8000]// Hiermee halen we, als we succesvol zijn ingelogd, data op van de gebruiker met de bijbehoorende POST-data[/COLOR]

[COLOR= #0000BB]$num[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$query[/COLOR][COLOR= #007700]);[/COLOR] [COLOR= #FF8000]// Met deze query controleren we de login, dus de POST-data username, en password, of er in de tabel overeenkomsten zijn.[/COLOR]

    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$num[/COLOR] [COLOR= #007700]<[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700])[/COLOR] [COLOR= #FF8000]// Gebruiker niet ingelogd, mogelijk verkeerde combinatie van username, en password[/COLOR]
    [COLOR= #007700]{[/COLOR]
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Gebruikersusername-/password komen niet overeen, probeer het opnieuw.[/COLOR][COLOR= #007700];
    }[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]
        [COLOR= #FF8000]// Gebruiker is ingelogd, nu maken we wat sessies van de gebruikte, en komende variablen, zodat je die later weer kan opvragen.[/COLOR]
        [COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]] =[/COLOR] [COLOR= #0000BB]$data[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]];[/COLOR]
        [COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]username[/COLOR][COLOR= #007700]] =[/COLOR] [COLOR= #0000BB]$data[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]username[/COLOR][COLOR= #007700]];[/COLOR]
        
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Welkom ingelogd, <strong>[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$data[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]username[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]</strong>.[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #FF8000]// Weergeef een welkoms bericht[/COLOR]
    [COLOR= #007700]}
    
}[/COLOR]

?>


 <div id="center">
      <h1><div align="center">Login pagina</div></h1>
          <div class="text">
                 <span>Log hier snel en veilig in op [COLOR= #0000BB]<?[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$web_naam[/COLOR][COLOR= #007700];[/COLOR] ?>.</span>
        </div>
        <div class="text">
            <img src="images/login.png" class="img" width="120" height="90" alt="" />
            <p>
            <form action="<?=$_SERVER[PHP_SELF];?>" method="post">
            <table border="1px" cellpadding="0">
            <tr><td>Gebruikersnaam:</td><td><input type="text" name="username" /></td></tr>
            <tr><td>Wachtwoord:</td><td><input type="password" name="password" /></td></tr>
            <tr><td><input type="button" name="sumbit" value="login" /></td><td>&nbsp;</td></tr>
            </table>
            </form>
            </p>


            <br /><br /><br />
            <h1><div align="center">Nog niet aangemeld?</div></h1>
                <div class="text">
                     <span>Registreer je gratis en snel in bij [COLOR= #0000BB]<?[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$web_naam[/COLOR][COLOR= #007700];[/COLOR] ?>.</span>
                 </div>
                 <br />
             <p>
             Klik op de link om je zelf te registreren <a href="aanmelden.php">Klik hier</a>.<br />
             Indien u al een lid ben, is dit niet voor toepassing voor u. 
             </p>
                          </div>
                        </div>

[COLOR= #0000BB]<?php[/COLOR]
foot[COLOR= #007700]();[/COLOR]
?>


EDIT:// De fout was dat hij de query al maakt terwijl er geen $_POST is. Dan bestaat die variable dus niet. Nu word de query alleen gemaakt als er op submit is geklikt.
0
Berichten
18.482
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Slotje op verzoek van TS
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