View Single Post
Old 01-04-2008, 03:43 PM   #24 (permalink)
webtuto
The Addict
 
webtuto's Avatar
 
Join Date: Dec 2007
Location: morocco
Posts: 221
Thanks: 19
webtuto is on a distinguished road
Default

PHP Code:
<?php
include("config.php") ;
if (isset(
$_POST['user']) && isset($_POST['password'])){
    
    
$user $_POST['user'];
    
$pass $_POST['password'];

$query "select * from members where user='$user' and pass='$pass'" ;
$result mysql_query($query) ;
$count mysql_num_rows($result) ;
if (
$count == 1) {
  
$timestamp_expire time() + 365*24*3600// Le cookie expirera dans un an
  
setcookie('user', ($_POST['user']), $timestamp_expire); // On crit un cookie
  
setcookie('pass'md5($_POST['password']), $timestamp_expire); // On crit un cookie
   
echo '<meta http-equiv="refresh" content="0;url=user_p.php" />';
}
else echo 
'le pass ke vs aves etres est faux';
}
 else{
?>

<table border=0 ><caption>member login</caption>
<form action="" method="post">
<tr><td><b>pseado</b><td><input type="text" name="user" ></tr>
<tr><td><b>mot de passe</b><td><input type="password" name="password" ></tr>
<tr><td><input type="submit" value="Entrer" ></tr>
</table> 

<?php ?>
the errors are header errors
Send a message via MSN to webtuto Send a message via Yahoo to webtuto Send a message via Skype™ to webtuto
webtuto is offline  
Reply With Quote