Inlogsysteem

Gestart doorJoeri41 reacties69 weergaven

42 berichten · pagina 3 van 3

Berichten
18.482
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
moet zijn
0
Joeri

Lid · Topicstarter

Berichten
5.737
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/kerjoeri/domains/kerjoeri.one2xs.com/public_html/header.php:4) in /home/kerjoeri/domains/kerjoeri.one2xs.com/public_html/header.php on line 4

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/kerjoeri/domains/kerjoeri.one2xs.com/public_html/header.php:4) in /home/kerjoeri/domains/kerjoeri.one2xs.com/public_html/header.php on line 4


Nou hier nogmaals header.php

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
 [COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/session_start"]session_start[/URL][COLOR= #007700]();[/COLOR]?>

        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
        <meta name="Weblife.nl" content="Weblife" />
        <title>Weblife</title>
    <link href="style.css" rel="stylesheet" type="text/css"/>
</head>

<body>

<div id = "container">
             <div id = "header">
                <div id = "title">Weblife</div><div id = "slogan">Jou tweede leven</div>
            </div>
            
                    <div id= "menu">
                        <div id="navigatie">
                               [COLOR= #0000BB]<?php[/COLOR] 
  
 [URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"menu.php"[/COLOR][COLOR= #007700]);[/COLOR]  ?>                         </div>    
                    </div>
                            <div id = "subheader"></div>

                                <div id = "main">
                                    <div id = "maintop">
0
Berichten
18.482
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/session_start"]session_start[/URL][COLOR= #007700]();[/COLOR]?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
        <meta name="Weblife.nl" content="Weblife" />
        <title>Weblife</title>
    <link href="style.css" rel="stylesheet" type="text/css"/>
</head>

<body>

<div id = "container">
             <div id = "header">
                <div id = "title">Weblife</div><div id = "slogan">Jou tweede leven</div>
            </div>
            
                    <div id= "menu">
                        <div id="navigatie">
                               [COLOR= #0000BB]<?php[/COLOR] 
  
 [URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"menu.php"[/COLOR][COLOR= #007700]);[/COLOR]  ?>                         </div>    
                    </div>
                            <div id = "subheader"></div>

                                <div id = "main">
                                    <div id = "maintop">
0
Joeri

Lid · Topicstarter

Berichten
5.737
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Geen foutmeldingen gehad alleen meld hij nog steeds dat ik niet ingelogd ben.
Ook in de database meld hij dat de laatste login niet veranderd is..
Nogmaals dit is de pagina waar je op zou moeten komen als je ingelogd was.

Update :

De code is wat veranderd

[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"header.php"[/COLOR][COLOR= #007700]);[/COLOR]  ?> 
                                    <!-- content left -->

                                    <div id= "content_left">
                                    
                                        <div class= "cadretop_blanc">
                                        <h1>Gebruikers Login</h1>
                                        </div>
                                            <div class= "cadremid_left">
                                            <div class= "text">
                                                   

                                                                                                                                                                                          [COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"includes/login.php"[/COLOR][COLOR= #007700]);[/COLOR]
                                                                                                                                                                                             
                                                                                                                                                                                                                           ?> 
                                            </div>
                                            </div>
                                        
                                        <div class = "space"></div>
                                        
                                        <div class= "cadretop_left"><h1>Linkpartners</h1></div>
                                            <div class= "cadremid_left">
                                            <div class= "text">
                                            Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. 
                                            Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
                                            <br /><br />
                                            Credits: <a href="http://www.sxc.hu" target="_blank">free stock fotos</a><br /><br />
                                            <a href="http://validator.w3.org/check?uri=referer"><img
                                            src="http://www.w3.org/Icons/valid-xhtml10-blue"
                                            alt="Valid XHTML 1.0 Strict" height="31" width="88" /></a><br />
                                            <a href="http://jigsaw.w3.org/css-validator/check/referer">
                                            <img style="border:0;width:88px;height:31px"
                                            src="http://jigsaw.w3.org/css-validator/images/vcss-blue"
                                            alt="Valide CSS!" />
                                            </a>


 
                                            </div>
                                            </div>

                                    </div>
                                    <!-- Einde content left -->
                                    
                                    <!-- Begin content midden -->

                                    <div id= "content_mid">
                                        <div class= "cadretop_blanc1"><h1>Welkom</h1></div>
                                            <div class= "cadremid_mid">
                                            
                                                                                                                                                                                      <div class= "text">  
                                                                                                                                                                                     [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]user[/COLOR][COLOR= #007700]]))[/COLOR] [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR] [COLOR= #DD0000]U bent niet ingelogd![/COLOR] [COLOR= #007700]);[/COLOR]

[COLOR= #0000BB]$user[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]user[/COLOR][COLOR= #007700]];[/COLOR]
[COLOR= #0000BB]$pass[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]pass[/COLOR][COLOR= #007700]];[/COLOR]


[COLOR= #0000BB]$QUERY[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"SELECT username, password FROM users WHERE username = "[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$user[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #DD0000]" AND password = "[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$pass[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700];[/COLOR]

[COLOR= #0000BB]$EXEC[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$identifier[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$QUERY[/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]1[/COLOR][COLOR= #007700]){[/COLOR]
   
    [URL="http://www.php.net/unset"]unset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]name[/COLOR][COLOR= #007700]],[/COLOR] [COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]pass[/COLOR][COLOR= #007700]]);[/COLOR]
   [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR] [COLOR= #DD0000]U bent niet ingelogd![/COLOR][COLOR= #007700]);
}[/COLOR]


 ?>  

                                                                                                                                                                                      </div>
                                                                                                                                                                                                           
                                                                                                                                                                                                                          

                                            </div>
                                        
                                        <div class = "space"></div>
                                        
                                        <div id = "content_con">
                                            <div id= "content_mid_left">
                                                <div class= "cadretop_mid1"><h1>Nieuws</h1></div>
                                                    <div class= "cadremid_mid_2">
                                                    <div class= "text">
                                                    <span><img src="images/newspaper.png" class="foto" alt=""  />
                                                    [COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"includes/nieuws.php"[/COLOR][COLOR= #007700]);[/COLOR]  ?>                                                     </span>
                                                    </div>
                                                    </div>
                                            </div>
                                            
                                            <div id= "content_mid_right">
                                                <div class= "cadretop_mid2"><h1>Support</h1></div>
                                                    <div class= "cadremid_mid_2">
                                                    <div class= "text">
                                                    <span><img src="images/pcroom.png" class="foto" alt=""  />
                                                    Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. 
                                                    Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
                                                    Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. 
                                                    <br /> <a href="#">Lees meer...</a>
                                                    </span>
                                                    </div>
                                                    </div>
                                            </div>
                                        </div>
                                        
                                    <div class = "space"></div>    
                                    </div>
                                </div>
                                </div>
                                    <!-- Einde content midden -->

                                    <!-- Einde content -->
                                <div style="clear: both;"></div>

                
                <div id = "footer"><h3> Alle rechten voorbehouden  2010 <a href="#" target="_blank">Jouwwebsite.nl</a> | Template by <a href="http://www.kfb-design.nl" target="_blank">KFB-Design.nl</a></h3></div>
</div>

</body>
</html>







 

Ben je ingelogd?
0
Berichten
18.482
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
[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]user[/COLOR][COLOR= #007700]]))[/COLOR] [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR] [COLOR= #DD0000]U bent niet ingelogd![/COLOR] [COLOR= #007700]);[/COLOR]

[COLOR= #0000BB]$user[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]user[/COLOR][COLOR= #007700]];[/COLOR]
[COLOR= #0000BB]$pass[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]pass[/COLOR][COLOR= #007700]];[/COLOR]


[COLOR= #0000BB]$QUERY[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"SELECT username, password FROM users WHERE username = "[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$user[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #DD0000]" AND password = "[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$pass[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700];[/COLOR]

[COLOR= #0000BB]$EXEC[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR] [COLOR= #0000BB]$QUERY[/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]$EXEC[/COLOR][COLOR= #007700]) <[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700]){[/COLOR]
   
    [URL="http://www.php.net/unset"]unset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]name[/COLOR][COLOR= #007700]],[/COLOR] [COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]pass[/COLOR][COLOR= #007700]]);[/COLOR]
   [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR] [COLOR= #DD0000]U bent niet ingelogd![/COLOR][COLOR= #007700]);
}[/COLOR]

?> 

Ben je ingelogd?
0
Joeri

Lid · Topicstarter

Berichten
5.737
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
En zelfs nu geeft hij aan je bent niet ingelogd.
Wil je het testen meld maar aan op kerjoeri.one2xs.com en test het inloggen maar (site bevat wel bugs en je wachtwoord kan worden bekeken doe aub een dom wachtwoord van test ofzo)

[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/include"]include[/URL] [COLOR= #DD0000]connection.php[/COLOR][COLOR= #007700];[/COLOR]

[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REQUEST_METHOD[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]POST[/COLOR][COLOR= #007700])
{[/COLOR]
    [COLOR= #0000BB]$user[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]name[/COLOR][COLOR= #007700]];[/COLOR]
    [COLOR= #0000BB]$pass[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]pass[/COLOR][COLOR= #007700]];[/COLOR] 
    [COLOR= #0000BB]$email[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]email[/COLOR][COLOR= #007700]];[/COLOR]
    [COLOR= #FF8000]// het formulier IS ingevuld[/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]name[/COLOR][COLOR= #007700]]))
    {[/COLOR]   
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Je hebt geen inlognaam ingevuld, <a href=""[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]PHP_SELF[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"?actie=registreren">Probeer het hieronder nogmaals </a>.<br/><br/>"[/COLOR][COLOR= #007700]; 
    }[/COLOR]
    [URL="http://www.php.net/elseif"]elseif[/URL][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]
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Je hebt geen wachtwoord ingevuld, <a href=""[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]PHP_SELF[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"?actie=registreren">Probeer het hieronder nogmaals</a>.<br/><br/>"[/COLOR][COLOR= #007700];
    }[/COLOR]
    [URL="http://www.php.net/elseif"]elseif[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]email[/COLOR][COLOR= #007700]]))
    {[/COLOR]
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Je hebt geen (geldig) e-mail adres ingevuld, <a href=""[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]PHP_SELF[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"?actie=registreren">Probeer het hieronder nogmaals</a>.<br/><br/>"[/COLOR][COLOR= #007700]; 
    }
        {[/COLOR]
          
       [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]name[/COLOR][COLOR= #007700]] &&[/COLOR] [URL="http://www.php.net/mysql_result"]mysql_result[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT COUNT(ID) FROM users WHERE name LIKE {$_POST["[/COLOR]name[COLOR= #DD0000]"]}"[/COLOR][COLOR= #007700]),[/COLOR][COLOR= #0000BB]0[/COLOR][COLOR= #007700])) {[/COLOR]
 [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Deze gebruikersnaam bestaat al, <a href=""[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]PHP_SELF[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"?actie=registreren">Probeer het hieronder nogmaals </a>.<br/><br/>"[/COLOR][COLOR= #007700]; 

    }

{
}[/COLOR]
       




 [COLOR= #FF8000]// als alle velden zijn ingevuld [/COLOR]
        [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"
        INSERT INTO
            users
                (
                    username,
                    password,
                    email,
                    enabled,
                    lastlogin
                )
        VALUES
            (
                "[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$user[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #DD0000]",
                "[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$pass[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #DD0000]",
                "[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$email[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #DD0000]",
                1,
                NOW()
            )
        "[/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]
        [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]Je bent succesvol geregistreerd =D[/COLOR][COLOR= #007700]);
    }[/COLOR]



    ?>

Welkom op de registratie-pagina.<br/>
Hier kunt u zich registreren. <br /><br />

<form action="#" method="post">
    Naam: <input name="name" maxlength="30" type="text" /><br />
    Wachtwoord: <input type="password" name="pass" maxlength="16" /><br />
    Email: <input type="text" maxlength="30" name="email" />
    <br/><br/><input type="submit" value="Registreer!" />
</form>


Hier snap ik echt niks meer van ik krijg deze error :
Parse error: syntax error, unexpected $end in /home/kerjoeri/domains/kerjoeri.one2xs.com/public_html/includes/register.php on line 74

Maar er zijn maar 71 regels..
Mischien ligt het eraan dat er ergens eerder in het systeem in fout is, ik heb alles wat ik kon vinden op proberen te lossen en er staat geen regel 71

Iemand die het weet?
0
Berichten
20.364
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/include"]include[/URL] [COLOR= #DD0000]connection.php[/COLOR][COLOR= #007700];[/COLOR]

[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REQUEST_METHOD[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]POST[/COLOR][COLOR= #007700])
{[/COLOR]
    [COLOR= #0000BB]$user[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]name[/COLOR][COLOR= #007700]];[/COLOR]
    [COLOR= #0000BB]$pass[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]pass[/COLOR][COLOR= #007700]];[/COLOR] 
    [COLOR= #0000BB]$email[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]email[/COLOR][COLOR= #007700]];[/COLOR]
    [COLOR= #FF8000]// het formulier IS ingevuld[/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]name[/COLOR][COLOR= #007700]]))
    {[/COLOR]   
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Je hebt geen inlognaam ingevuld, <a href=""[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]PHP_SELF[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"?actie=registreren">Probeer het hieronder nogmaals </a>.<br/><br/>"[/COLOR][COLOR= #007700]; 
    }[/COLOR]
    [URL="http://www.php.net/elseif"]elseif[/URL][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]
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Je hebt geen wachtwoord ingevuld, <a href=""[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]PHP_SELF[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"?actie=registreren">Probeer het hieronder nogmaals</a>.<br/><br/>"[/COLOR][COLOR= #007700];
    }[/COLOR]
    [URL="http://www.php.net/elseif"]elseif[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]email[/COLOR][COLOR= #007700]]))
    {[/COLOR]
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Je hebt geen (geldig) e-mail adres ingevuld, <a href=""[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]PHP_SELF[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"?actie=registreren">Probeer het hieronder nogmaals</a>.<br/><br/>"[/COLOR][COLOR= #007700]; 
    }
        {[/COLOR]
          
       [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]name[/COLOR][COLOR= #007700]] &&[/COLOR] [URL="http://www.php.net/mysql_result"]mysql_result[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT COUNT(ID) FROM users WHERE name LIKE {$_POST["[/COLOR]name[COLOR= #DD0000]"]}"[/COLOR][COLOR= #007700]),[/COLOR][COLOR= #0000BB]0[/COLOR][COLOR= #007700])) {[/COLOR]
 [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Deze gebruikersnaam bestaat al, <a href=""[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]PHP_SELF[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"?actie=registreren">Probeer het hieronder nogmaals </a>.<br/><br/>"[/COLOR][COLOR= #007700]; 

    }

{
}[/COLOR]
       




 [COLOR= #FF8000]// als alle velden zijn ingevuld [/COLOR]
        [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"
        INSERT INTO
            users
                (
                    username,
                    password,
                    email,
                    enabled,
                    lastlogin
                )
        VALUES
            (
                "[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$user[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #DD0000]",
                "[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$pass[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #DD0000]",
                "[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$email[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #DD0000]",
                1,
                NOW()
            )
        "[/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]
        [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]Je bent succesvol geregistreerd =D[/COLOR][COLOR= #007700]);
    }[/COLOR]



    ?>

Welkom op de registratie-pagina.<br/>
Hier kunt u zich registreren. <br /><br />

<form action="#" method="post">
    Naam: <input name="name" maxlength="30" type="text" /><br />
    Wachtwoord: <input type="password" name="pass" maxlength="16" /><br />
    Email: <input type="text" maxlength="30" name="email" />
    <br/><br/><input type="submit" value="Registreer!" />
</form>
[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #007700]}[/COLOR]
?>
0
Joeri

Lid · Topicstarter

Berichten
5.737
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in /home/kerjoeri/domains/kerjoeri.one2xs.com/public_html/includes/register.php on line 24


[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/include"]include[/URL] [COLOR= #DD0000]connection.php[/COLOR][COLOR= #007700];[/COLOR]

[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REQUEST_METHOD[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]POST[/COLOR][COLOR= #007700])
{[/COLOR]
    [COLOR= #0000BB]$user[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]name[/COLOR][COLOR= #007700]];[/COLOR]
    [COLOR= #0000BB]$pass[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]pass[/COLOR][COLOR= #007700]];[/COLOR] 
    [COLOR= #0000BB]$email[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]email[/COLOR][COLOR= #007700]];[/COLOR]
    [COLOR= #FF8000]// het formulier IS ingevuld[/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]name[/COLOR][COLOR= #007700]]))
    {[/COLOR]   
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Je hebt geen inlognaam ingevuld, <a href=""[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]PHP_SELF[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"?actie=registreren">Probeer het hieronder nogmaals </a>.<br/><br/>"[/COLOR][COLOR= #007700]; 
    }[/COLOR]
    [URL="http://www.php.net/elseif"]elseif[/URL][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]
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Je hebt geen wachtwoord ingevuld, <a href=""[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]PHP_SELF[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"?actie=registreren">Probeer het hieronder nogmaals</a>.<br/><br/>"[/COLOR][COLOR= #007700];
    }[/COLOR]
    [URL="http://www.php.net/elseif"]elseif[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]email[/COLOR][COLOR= #007700]]))
    {[/COLOR]
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Je hebt geen (geldig) e-mail adres ingevuld, <a href=""[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]PHP_SELF[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"?actie=registreren">Probeer het hieronder nogmaals</a>.<br/><br/>"[/COLOR][COLOR= #007700]; 
    }
        {[/COLOR]
          
       [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]name[/COLOR][COLOR= #007700]] &&[/COLOR] [URL="http://www.php.net/mysql_result"]mysql_result[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT COUNT(ID) FROM users WHERE name LIKE {$_POST["[/COLOR]name[COLOR= #DD0000]"]}"[/COLOR][COLOR= #007700]),[/COLOR][COLOR= #0000BB]0[/COLOR][COLOR= #007700])) {[/COLOR]
 [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Deze gebruikersnaam bestaat al, <a href=""[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]PHP_SELF[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"?actie=registreren">Probeer het hieronder nogmaals </a>.<br/><br/>"[/COLOR][COLOR= #007700]; 

    }

{
}[/COLOR]
       




 [COLOR= #FF8000]// als alle velden zijn ingevuld [/COLOR]
        [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"
        INSERT INTO
            users
                (
                    username,
                    password,
                    email,
                    enabled,
                    lastlogin
                )
        VALUES
            (
                "[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$user[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #DD0000]",
                "[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$pass[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #DD0000]",
                "[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$email[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #DD0000]",
                1,
                NOW()
            )
        "[/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]
        [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]Je bent succesvol geregistreerd =D[/COLOR][COLOR= #007700]);
    }

}[/COLOR]

    ?>

Welkom op de registratie-pagina.<br/>
Hier kunt u zich registreren. <br /><br />

<form action="#" method="post">
    Naam: <input name="name" maxlength="30" type="text" /><br />
    Wachtwoord: <input type="password" name="pass" maxlength="16" /><br />
    Email: <input type="text" maxlength="30" name="email" />
    <br/><br/><input type="submit" value="Registreer!" />
</form>


Nog steeds een fout dus..
En dat } ding moest naar boven anders gaf hij helemaal niks aan..
0
Berichten
20.364
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/include"]include[/URL] [COLOR= #DD0000]connection.php[/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]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]user[/COLOR][COLOR= #007700]]))
    {[/COLOR]

    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REQUEST_METHOD[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]POST[/COLOR][COLOR= #007700])
    {[/COLOR]

    [COLOR= #0000BB]$user[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]name[/COLOR][COLOR= #007700]];[/COLOR]
    [COLOR= #0000BB]$pass[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]pass[/COLOR][COLOR= #007700]];[/COLOR] 
    [COLOR= #0000BB]$email[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]email[/COLOR][COLOR= #007700]];[/COLOR]
    [COLOR= #FF8000]// het formulier IS ingevuld[/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]name[/COLOR][COLOR= #007700]]))
    {[/COLOR]   
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Je hebt geen inlognaam ingevuld, <a href=""[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]PHP_SELF[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"?actie=registreren">Probeer het hieronder nogmaals </a>.<br/><br/>"[/COLOR][COLOR= #007700]; 
    }[/COLOR]
    [URL="http://www.php.net/elseif"]elseif[/URL][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]
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Je hebt geen wachtwoord ingevuld, <a href=""[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]PHP_SELF[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"?actie=registreren">Probeer het hieronder nogmaals</a>.<br/><br/>"[/COLOR][COLOR= #007700];
    }[/COLOR]
    [URL="http://www.php.net/elseif"]elseif[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]email[/COLOR][COLOR= #007700]]))
    {[/COLOR]
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Je hebt geen (geldig) e-mail adres ingevuld, <a href=""[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]PHP_SELF[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"?actie=registreren">Probeer het hieronder nogmaals</a>.<br/><br/>"[/COLOR][COLOR= #007700]; 
    }[/COLOR]
   
         
                        [COLOR= #0000BB]$sQuery[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT 1 FROM users WHERE name = "[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/strtolower"]strtolower[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]name[/COLOR][COLOR= #007700]])) .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700]);
 {[/COLOR]
 [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Deze gebruikersnaam bestaat al, <a href=""[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]PHP_SELF[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"?actie=registreren">Probeer het hieronder nogmaals </a>.<br/><br/>"[/COLOR][COLOR= #007700]; 

    }

}[/COLOR]
       



 [COLOR= #FF8000]// als alle velden zijn ingevuld [/COLOR]
        [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"
        INSERT INTO
            users
                (
                    username,
                    password,
                    email,
                    enabled,
                    lastlogin
                )
        VALUES
            (
                "[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$user[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #DD0000]",
                "[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$pass[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #DD0000]",
                "[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$email[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #DD0000]",
                1,
                NOW()
            )
        "[/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]
        [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]Je bent succesvol geregistreerd =D[/COLOR][COLOR= #007700]);
    }

}[/COLOR]

    ?>

Welkom op de registratie-pagina.<br/>
Hier kunt u zich registreren. <br /><br />

<form action="#" method="post">
    Naam: <input name="name" maxlength="30" type="text" /><br />
    Wachtwoord: <input type="password" name="pass" maxlength="16" /><br />
    Email: <input type="text" maxlength="30" name="email" />
    <br/><br/><input type="submit" value="Registreer!" />
</form>
[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #007700]}[/COLOR]
?>
0
Joeri

Lid · Topicstarter

Berichten
5.737
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Hmm geprobeerd en ik kan nog steeds 20 joeris aanmaken

Het is in de database kerjoeri_weblife in de tabel users.

Geld vanaf nu :

0.1 per probleem wat je oplost.
0
Erik

Lid

Berichten
7.109
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/include"]include[/URL] [COLOR= #DD0000]connection.php[/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]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]user[/COLOR][COLOR= #007700]]))
    {[/COLOR]

    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REQUEST_METHOD[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]POST[/COLOR][COLOR= #007700])
    {[/COLOR]

    [COLOR= #0000BB]$user[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]name[/COLOR][COLOR= #007700]];[/COLOR]
    [COLOR= #0000BB]$pass[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]pass[/COLOR][COLOR= #007700]];[/COLOR] 
    [COLOR= #0000BB]$email[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]email[/COLOR][COLOR= #007700]];[/COLOR]
    [COLOR= #FF8000]// het formulier IS ingevuld[/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]name[/COLOR][COLOR= #007700]]))
    {[/COLOR]   
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Je hebt geen inlognaam ingevuld, <a href=""[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]PHP_SELF[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"?actie=registreren">Probeer het hieronder nogmaals </a>.<br/><br/>"[/COLOR][COLOR= #007700]; 
    }[/COLOR]
    [URL="http://www.php.net/elseif"]elseif[/URL][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]
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Je hebt geen wachtwoord ingevuld, <a href=""[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]PHP_SELF[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"?actie=registreren">Probeer het hieronder nogmaals</a>.<br/><br/>"[/COLOR][COLOR= #007700];
    }[/COLOR]
    [URL="http://www.php.net/elseif"]elseif[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]email[/COLOR][COLOR= #007700]]))
    {[/COLOR]
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Je hebt geen (geldig) e-mail adres ingevuld, <a href=""[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]PHP_SELF[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"?actie=registreren">Probeer het hieronder nogmaals</a>.<br/><br/>"[/COLOR][COLOR= #007700]; 
    }[/COLOR]
   
         
                        [COLOR= #0000BB]$sQuery[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT 1 FROM users WHERE name = "[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/strtolower"]strtolower[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]name[/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]$sQuery[/COLOR][COLOR= #007700]) ==[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700])
 {[/COLOR]
 [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Deze gebruikersnaam bestaat al, <a href=""[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]PHP_SELF[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"?actie=registreren">Probeer het hieronder nogmaals </a>.<br/><br/>"[/COLOR][COLOR= #007700]; 

    }

}[/COLOR]
       



 [COLOR= #FF8000]// als alle velden zijn ingevuld [/COLOR]
        [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"
        INSERT INTO
            users
                (
                    username,
                    password,
                    email,
                    enabled,
                    lastlogin
                )
        VALUES
            (
                "[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$user[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #DD0000]",
                "[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$pass[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #DD0000]",
                "[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$email[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #DD0000]",
                1,
                NOW()
            )
        "[/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]
        [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]Je bent succesvol geregistreerd =D[/COLOR][COLOR= #007700]);
    }

}[/COLOR]

    ?>

Welkom op de registratie-pagina.<br/>
Hier kunt u zich registreren. <br /><br />

<form action="#" method="post">
    Naam: <input name="name" maxlength="30" type="text" /><br />
    Wachtwoord: <input type="password" name="pass" maxlength="16" /><br />
    Email: <input type="text" maxlength="30" name="email" />
    <br/><br/><input type="submit" value="Registreer!" />
</form>
[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #007700]}[/COLOR]
?>
0
Joeri

Lid · Topicstarter

Berichten
5.737
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Hij zet hem nu er niet meer in na een dubbele dinges alleen geeft hij geen foutmelding aan...
Er zaten toenet 2 foutjes in die ik er zelf uit heb kunnen halen.
Als erik even die dingen geeft geef ik 0.1

Ook is het nog steeds het inlog probleem.
iemand enig idee wat het antwoord op dat raadsel is?

UPDATE :

Startpost geupdate

http://www.one2xs.com/threads/12162&p=1#169732
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