GRATIS Ledensysteem!

Gestart doorIlyasftw21 reacties32 weergaven

22 berichten · pagina 1 van 2

Ilyasftw

Lid · Topicstarter

Berichten
1.157
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Hoi, ik weet niet waarom ik dit in "aanbiedingen" zet.
Maarja, veel mensen zochten een Ledesysteem. Hier heb ik er 1 met login en registreren! Dit is niet van mij maar van phphulp

Mysql tabel:
Spoiler tonen
CREATE TABLE members ( 
id int(10) auto_increment not null, 
level int(1) not null, 
datum varchar(10) not null, 
nickname varchar(20) not null, 
password varchar(20) not null, 
voornaam varchar(20) not null, 
achternaam varchar(20) not null, 
emailadres varchar(50) not null
site varchar(100) not null, 
jaar int(4) not null, 
dag int(2) not null, 
maand int(2) not null, 
primary key(id) 
)
Config.php
Spoiler tonen
[COLOR= #0000BB]<?php[/COLOR]   
[COLOR= #FF8000]//MySQL gegevens
//Met dit bestand kan je de bezoeker zijn gegevens laten zien[/COLOR]
 
[URL="http://www.php.net/mysql_connect"]mysql_connect[/URL] [COLOR= #007700]([/COLOR][COLOR= #DD0000]"localhost"[/COLOR][COLOR= #007700],[/COLOR][COLOR= #DD0000]"je_username"[/COLOR][COLOR= #007700],[/COLOR][COLOR= #DD0000]"je_password"[/COLOR][COLOR= #007700]);[/COLOR]   
[URL="http://www.php.net/mysql_select_db"]mysql_select_db[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"je_database"[/COLOR][COLOR= #007700]);[/COLOR]   
 
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$level[/COLOR] [COLOR= #007700]>[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700])  
{[/COLOR] [COLOR= #0000BB]$Query[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"SELECT * FROM members WHERE id = $jeid"[/COLOR][COLOR= #007700];[/COLOR]   
  [COLOR= #0000BB]$Resultaat[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$Query[/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/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$Rij[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_object"]mysql_fetch_object[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$Resultaat[/COLOR][COLOR= #007700]))  
  {[/COLOR] [COLOR= #0000BB]$jenickname[/COLOR] [COLOR= #007700]=[/COLOR][COLOR= #DD0000]"$Rij->nickname"[/COLOR][COLOR= #007700];[/COLOR]  
    [COLOR= #0000BB]$jepassword[/COLOR] [COLOR= #007700]=[/COLOR][COLOR= #DD0000]"$Rij->password"[/COLOR][COLOR= #007700];[/COLOR]  
    [COLOR= #0000BB]$jevoornaam[/COLOR] [COLOR= #007700]=[/COLOR][COLOR= #DD0000]"$Rij->voornaam"[/COLOR][COLOR= #007700];[/COLOR]  
    [COLOR= #0000BB]$jeachternaam[/COLOR] [COLOR= #007700]=[/COLOR][COLOR= #DD0000]"$Rij->achternaam"[/COLOR][COLOR= #007700];[/COLOR]  
    [COLOR= #0000BB]$jeemailadres[/COLOR] [COLOR= #007700]=[/COLOR][COLOR= #DD0000]"$Rij->emailadres"[/COLOR][COLOR= #007700];[/COLOR]  
    [COLOR= #0000BB]$jejaar[/COLOR] [COLOR= #007700]=[/COLOR][COLOR= #DD0000]"$Rij->jaar"[/COLOR][COLOR= #007700];[/COLOR]  
    [COLOR= #0000BB]$jedag[/COLOR] [COLOR= #007700]=[/COLOR][COLOR= #DD0000]"$Rij->dag"[/COLOR][COLOR= #007700];[/COLOR]  
    [COLOR= #0000BB]$jemaand[/COLOR] [COLOR= #007700]=[/COLOR][COLOR= #DD0000]"$Rij->maand"[/COLOR][COLOR= #007700];[/COLOR]  
    [COLOR= #0000BB]$jesite[/COLOR] [COLOR= #007700]=[/COLOR][COLOR= #DD0000]"$Rij->site"[/COLOR][COLOR= #007700];  
  }
}[/COLOR]  
?>
index.php //pagina met login formulier
Spoiler tonen
[spoiler][COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/ob_start"]ob_start[/URL][COLOR= #007700]();[/COLOR]

[COLOR= #FF8000]//Hoe lang de bezoeker mag ingelogged blijven:[/COLOR]
[COLOR= #0000BB]$expiredate[/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]7[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #FF8000]//ingesteld op 1 week[/COLOR]
 
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$logout[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700])  
{[/COLOR]   [URL="http://www.php.net/setcookie"]setcookie[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"username"[/COLOR][COLOR= #007700]);[/COLOR]
    [URL="http://www.php.net/setcookie"]setcookie[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"passgecodeerd"[/COLOR][COLOR= #007700]);[/COLOR]
    [URL="http://www.php.net/header"]header[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"location:index.php"[/COLOR][COLOR= #007700]);[/COLOR]  
    [URL="http://www.php.net/exit"]exit[/URL][COLOR= #007700];
}[/COLOR]
 
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"username"[/COLOR][COLOR= #007700]] &&[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"password"[/COLOR][COLOR= #007700]])  
{[/COLOR]   [COLOR= #FF8000]// password coderen[/COLOR]
    [COLOR= #0000BB]$passgecodeerd[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/md5"]md5[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"password"[/COLOR][COLOR= #007700]]);[/COLOR]
    [COLOR= #0000BB]$username[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"username"[/COLOR][COLOR= #007700]];[/COLOR]
 
    [COLOR= #FF8000]// variabelen in een cookie zetten[/COLOR]
    [URL="http://www.php.net/setcookie"]setcookie[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"username"[/COLOR][COLOR= #007700],[/COLOR][COLOR= #0000BB]$username[/COLOR][COLOR= #007700],[/COLOR][COLOR= #0000BB]$expiredate[/COLOR][COLOR= #007700]);[/COLOR]
    [URL="http://www.php.net/setcookie"]setcookie[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"passgecodeerd"[/COLOR][COLOR= #007700],[/COLOR][COLOR= #0000BB]$passgecodeerd[/COLOR][COLOR= #007700],[/COLOR][COLOR= #0000BB]$expiredate[/COLOR][COLOR= #007700]);[/COLOR]
    [URL="http://www.php.net/header"]header[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"location:$_SERVER[REQUEST_URI]"[/COLOR][COLOR= #007700]);[/COLOR]  
 
    [URL="http://www.php.net/exit"]exit[/URL][COLOR= #007700];
}[/COLOR]
 
[COLOR= #0000BB]$controle[/COLOR] [COLOR= #007700]==[/COLOR] FALSE[COLOR= #007700];[/COLOR]  
[COLOR= #0000BB]$level[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700];[/COLOR]  
[COLOR= #0000BB]$jeid[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700];[/COLOR]  
[URL="http://www.php.net/include"]include[/URL] [COLOR= #007700]([/COLOR][COLOR= #DD0000]"login.php"[/COLOR][COLOR= #007700]);[/COLOR]   
[COLOR= #0000BB]$controle[/COLOR] [COLOR= #007700]=[/COLOR] password[COLOR= #007700]([/COLOR][COLOR= #0000BB]$username[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$passgecodeerd[/COLOR][COLOR= #007700]);[/COLOR]  
 
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$controle[/COLOR] [COLOR= #007700]==[/COLOR] TRUE[COLOR= #007700])  
{[/COLOR] [COLOR= #0000BB]$query[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"SELECT * FROM members where id=$jeid"[/COLOR][COLOR= #007700];[/COLOR]  
  [COLOR= #0000BB]$resultaat[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$query[/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/while"]while[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$obj[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_object"]mysql_fetch_object[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$resultaat[/COLOR][COLOR= #007700]))  
  {[/COLOR] [COLOR= #0000BB]$nickname[/COLOR] [COLOR= #007700]=[/COLOR][COLOR= #DD0000]"$obj->nickname"[/COLOR][COLOR= #007700];[/COLOR]  
    [COLOR= #0000BB]$jeid[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #DD0000]"$obj->id"[/COLOR][COLOR= #007700];[/COLOR]  
    [COLOR= #0000BB]$level[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #DD0000]"$obj->level"[/COLOR][COLOR= #007700];  
  }[/COLOR]
[URL="http://www.php.net/include"]include[/URL] [COLOR= #007700]([/COLOR][COLOR= #DD0000]config.php[/COLOR][COLOR= #007700]);
}[/COLOR]  
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]Login[/COLOR][COLOR= #007700]] &&[/COLOR] [COLOR= #0000BB]$controle[/COLOR] [COLOR= #007700]==[/COLOR] TRUE[COLOR= #007700])[/COLOR]
  [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Je bent succesvol ingelogged"[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/elseif"]elseif[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]Login[/COLOR][COLOR= #007700]] &&[/COLOR] [COLOR= #0000BB]$controle[/COLOR] [COLOR= #007700]!=[/COLOR] TRUE[COLOR= #007700])[/COLOR]
  [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Fout wachtwoord en/of gebruikersnaam"[/COLOR][COLOR= #007700];[/COLOR]
?>  
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 ...>
<html>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=...">
    <title>Login</title>
  </head>
  <body>
    [COLOR= #0000BB]<?php[/COLOR]
    [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$controle[/COLOR] [COLOR= #007700]!=[/COLOR] TRUE[COLOR= #007700])
    {[/COLOR] ?><form method="post" action="">
          <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr><td>Username:</td></tr>
            <tr><td><input type="text" name="username"></td></tr>
            <tr><td>Password:</td></tr>
            <tr><td><input type="password" name="password"></td></tr>
            <tr><td><input type="submit" value="Login" name="Login"></td></tr>
        </table>
      </form>
    [COLOR= #0000BB]<?php[/COLOR]
    [COLOR= #007700]}[/COLOR] [URL="http://www.php.net/elseif"]elseif[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$controle[/COLOR] [COLOR= #007700]==[/COLOR] TRUE[COLOR= #007700]) {[/COLOR]
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Welkom $jenickname"[/COLOR][COLOR= #007700];
    }[/COLOR] ?>
</body>
</html>
Login.php
Spoiler tonen
[COLOR= #0000BB]<?php[/COLOR]   
[URL="http://www.php.net/include"]include[/URL] [COLOR= #007700]([/COLOR][COLOR= #DD0000]"config.php"[/COLOR][COLOR= #007700]);
function[/COLOR] password[COLOR= #007700]([/COLOR][COLOR= #0000BB]$username[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$passgecodeerd[/COLOR][COLOR= #007700])  
{[/COLOR] [URL="http://www.php.net/global"]global[/URL] [COLOR= #0000BB]$level[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$jeid[/COLOR][COLOR= #007700];[/COLOR]  
  [COLOR= #0000BB]$pass_uit_database[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700];[/COLOR]   
  [COLOR= #0000BB]$level[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700];[/COLOR]  
  [COLOR= #0000BB]$jeid[/COLOR] [COLOR= #007700]=[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700];[/COLOR]  
  [COLOR= #0000BB]$sql[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"SELECT * FROM members WHERE nickname = $username"[/COLOR][COLOR= #007700];[/COLOR]   
  [COLOR= #0000BB]$resultaat[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$sql[/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/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$row[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_object"]mysql_fetch_object[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$resultaat[/COLOR][COLOR= #007700]))  
  {[/COLOR] [COLOR= #0000BB]$pass_uit_database[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/md5"]md5[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$row[/COLOR][COLOR= #007700]->[/COLOR]password[COLOR= #007700]);[/COLOR]   
    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$passgecodeerd[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #0000BB]$pass_uit_database[/COLOR][COLOR= #007700])  
    {[/COLOR] [COLOR= #0000BB]$level[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #0000BB]$row[/COLOR][COLOR= #007700]->[/COLOR]level[COLOR= #007700];[/COLOR]  
      [COLOR= #0000BB]$jeid[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #0000BB]$row[/COLOR][COLOR= #007700]->[/COLOR]id[COLOR= #007700];[/COLOR]  
      [URL="http://www.php.net/return"]return[/URL] [COLOR= #0000BB]$level[/COLOR][COLOR= #007700];[/COLOR]  
      [URL="http://www.php.net/return"]return[/URL] [COLOR= #0000BB]$jeid[/COLOR][COLOR= #007700];[/COLOR]  
      [URL="http://www.php.net/return"]return[/URL] TRUE[COLOR= #007700];   
    }[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]   
      [URL="http://www.php.net/return"]return[/URL] FALSE[COLOR= #007700];   
    }   
  }[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]   
  [URL="http://www.php.net/return"]return[/URL] FALSE[COLOR= #007700];   
  }   
}[/COLOR]
?>

Registreren.php

[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/include"]include[/URL] [COLOR= #007700]([/COLOR][COLOR= #DD0000]"config.php"[/COLOR][COLOR= #007700]);[/COLOR]  
 
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]Registreer[/COLOR][COLOR= #007700]])  
{[/COLOR] [COLOR= #0000BB]$datum[/COLOR] [COLOR= #007700]=[/COLOR][URL="http://www.php.net/date"]date[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]d/m/Y[/COLOR][COLOR= #007700]);[/COLOR] [COLOR= #FF8000]//datum
  //checken of de username al in gebruik is[/COLOR]
  [COLOR= #0000BB]$check_nickname[/COLOR][COLOR= #007700]=[/COLOR][URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT nickname FROM members WHERE nickname=$nickname"[/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]$aantal_nickname[/COLOR][COLOR= #007700]=[/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$check_nickname[/COLOR][COLOR= #007700]);[/COLOR]
  [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$aantal_nickname[/COLOR] [COLOR= #007700]>[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700])[/COLOR]  
    [COLOR= #0000BB]$error[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"De nickname is al in gebruik"[/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]nickname[/COLOR][COLOR= #007700]]))[/COLOR]  
    [COLOR= #0000BB]$error[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"Je moet je nickname invullen"[/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]voornaam[/COLOR][COLOR= #007700]]))[/COLOR]  
    [COLOR= #0000BB]$error[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"Je moet je voornaam invullen"[/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]achternaam[/COLOR][COLOR= #007700]]))[/COLOR]
    [COLOR= #0000BB]$error[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"Je moet een achternaam invullen"[/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]emailadres[/COLOR][COLOR= #007700]]))[/COLOR]
    [COLOR= #0000BB]$error[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"Je moet je email-adres invullen"[/COLOR][COLOR= #007700];[/COLOR]
  [URL="http://www.php.net/elseif"]elseif[/URL] [COLOR= #007700](![/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]dag[/COLOR][COLOR= #007700]][/COLOR] or [COLOR= #007700]![/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]maand[/COLOR][COLOR= #007700]][/COLOR] or [COLOR= #007700]![/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]jaar[/COLOR][COLOR= #007700]])[/COLOR]
    [COLOR= #0000BB]$error[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"Je moet je geboortedatum volledig invullen"[/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]password[/COLOR][COLOR= #007700]]))[/COLOR]
    [COLOR= #0000BB]$error[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"Je moet een password invullen"[/COLOR][COLOR= #007700];[/COLOR]
  [URL="http://www.php.net/elseif"]elseif[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]password[/COLOR][COLOR= #007700]] !=[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]password2[/COLOR][COLOR= #007700]])[/COLOR]
    [COLOR= #0000BB]$error[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"Het eerst password is niet gelijk aan het tweede"[/COLOR][COLOR= #007700];[/COLOR]
 
  [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700](![/COLOR][COLOR= #0000BB]$error[/COLOR][COLOR= #007700])  
  {[/COLOR] [COLOR= #FF8000]//als er geen error is dan maken we de query[/COLOR]
  [COLOR= #0000BB]$query[/COLOR] [COLOR= #007700]=[/COLOR][COLOR= #DD0000]"INSERT INTO members (datum, site, nickname, voornaam,
achternaam, emailadres, dag, maand, jaar, password, level)
VALUES ($datum, $site, $nickname, $voornaam, $achternaam,
$emailadres, $dag, $maand, $jaar, $password, 2)"[/COLOR][COLOR= #007700];[/COLOR]  
 
  [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$query[/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= #FF8000]//query uitoefenen[/COLOR]
  [URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000]"<div align=center>Je bent geregistreerd<br>Je kan nu inloggen</div>"[/COLOR][COLOR= #007700];   
 
  }[/COLOR] [URL="http://www.php.net/elseif"]elseif[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$error[/COLOR][COLOR= #007700]) {[/COLOR]  
?>  
<div align="center">
<table width="50%" border="1" cellspacing="0" cellpadding="2">
  <tr>
    <td bordercolor="#000000" bgcolor="#CCCCCC" height="36">
    <div align="center">[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000]<font color=black size=-1 face=verdana><b>[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$error[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]</b></font>[/COLOR][COLOR= #007700];[/COLOR] ?></div>
    <form method="post" action="javascript:history.go(-1)">
      <div align=center><input type="submit" name="Terug" value="Terug"></div>
    </form>
   </td>
  </tr>
</table>
</div>
[COLOR= #0000BB]<?php[/COLOR]
  [COLOR= #007700]}   
}[/COLOR]  
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700](![/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]Registreer[/COLOR][COLOR= #007700]])  
{[/COLOR] ?>   
<form method="post" action="">
  <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr><td>Voornaam:</td></tr>
    <tr><td><input type="text" name="voornaam"></td></tr>
    <tr><td>Achternaam:</td></tr>
    <tr><td><input type="text" name="achternaam"></td></tr>
    <tr><td>Nickname:</td></tr>
    <tr><td><input type="text" name="nickname"></td></tr>
    <tr><td>Geboorte datum:</td></tr>
   <tr><td>
      <input type="text" name="dag" size="4" maxlength="2">
      <input type="text" name="maand" size="4" maxlength="2">
      <input type="text" name="jaar" size="8" maxlength="4">
    </td></tr>
    <tr><td>E-mailadres:</td></tr>
    <tr><td><input type="text" name="emailadres"></td></tr>
    <tr><td>Website:</td></tr>
    <tr><td>
    <input type="text" name="site"><br>
    <font size="-2" color="#FF0000">Met http:// ervoor ! Als je geen site hebt veld leeglaten a.u.b</font>
    </td></tr>
    <tr><td>Password:</td></tr>
    <tr><td><input type="password" name="password"></td></tr>
    <tr><td>Nog eens je password:</td></tr>
    <tr><td><input type="password" name="password2"></td></tr>
    <tr><td>&nbsp;</td></tr>
    <tr><td>
      <input type="Submit" name="Registreer" value="Registreer">
      <input type="Reset" name="Reset" value="Wis velden">
    </td></tr>
  </table>
</form>
[COLOR= #0000BB]<?php[/COLOR] [COLOR= #007700]}[/COLOR] ?>


Tada, dat waren ze
Nu geen mensen die ledensystemen gaan kopen!
0
Berichten
4.213
Reputatie
0
Punten
0,02
Lid sinds
Laatst gezien
een beveiligde pagina is wel handig voor dat je paginas kan aanmaken die alleen voor lewden zijn
0
Gbtm

Lid

Berichten
412
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
deze heb ik eerder gezien
komt vna phphulp ergens...
0
Berichten
408
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Spelmaffia schreef:
een beveiligde pagina is wel handig voor dat je paginas kan aanmaken die alleen voor lewden zijn
Heb je gelijk in thumbsup
@Ilyas
Toppie dat je dit plaatst zet er ook session start bij. Voor de beveiliigng.
0
Berichten
461
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Demo verplicht emo
0
Berichten
221
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
dit is net zon pokke systeem als membersysteem van gratiswebscripts

hij werkt niet dus heeft ook geen zin

en geript smile
0
Berichten
461
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Goed genoeg om te reporten dus yummie
0
Berichten
4.213
Reputatie
0
Punten
0,02
Lid sinds
Laatst gezien
Dit is geen leden systeem maar een inlog syteempje want je kunt geen paginas beveiligen dat allleen leden erop kunnen komen
0
Berichten
3.788
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Kan iemand mij vertellen waarom IlyasFTW met al dat rippen nog steeds geen % heeft?
0
Berichten
4.213
Reputatie
0
Punten
0,02
Lid sinds
Laatst gezien
Luister hij bied dit aan
Dus je moet niet zeggen waarom hij nog geen % gehad heeft

Dan reportje hem maar
0
Ilyasftw

Lid · Topicstarter

Berichten
1.157
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Er staat toch dat het van phphulp is
0
Berichten
509
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Maar je mag niks aanbieden, wat niet door jou is gemaakt. Tenzij je de rechten hebt.
0
Ilyasftw

Lid · Topicstarter

Berichten
1.157
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ik heb hiervoor rechten gevraagd
0
Berichten
259
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
JALOEZIIEEE
0
Berichten
3.788
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ilyasftw schreef:
Er staat toch dat het van phphulp is

Dat heb je er net snel bij gezetwink
Kurdoo schreef:
JALOEZIIEEE
Is geen jaloezie, ik kan dit zelf zonder problemen, maar is gewoon belachelijk dat hij constand dingen van anderen post, en er dan zn eigen naam onderzet...
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