View Single Post
Old 01-02-2008, 11:17 AM   #5 (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
ob_start
()
if (!empty(
$_POST[name]) and !empty($_POST[pass]) ) {
error_reporting(E_ALL);  
include(
"config.php") ;
$result mysql_query("select * from members") ;
while (
$row mysql_fetch_array($result) ) {
$id $row[id] ;
}
$query "select user from members where pass='$_POST[pass]'";
$res mysql_query($query) ;
$count mysql_num_rows($res) ;
if (
$count == ) {
 if (!isset(
$_COOKIE[user]) and !isset($_COOKIE[pass]) ) {
   
$timestamp_expire time() + 365*24*3600// Le cookie expirera dans un an
setcookie('user', ($_POST['name']), $timestamp_expire); // On écrit un cookie
setcookie('pass', ($_POST['pass']), $timestamp_expire); // On écrit un autre cookie...
setcookie('id'$id $timestamp_expire); // On écrit un autre cookie...
echo"<meta http-equiv='refresh' content='0;url=user_p.php' ";  
 }else{ echo
"<meta http-equiv='refresh' content='0;url=user_p.php' ";   }
}else{ echo 
"the nickname or password are false try again" ; }
}else{ echo 
"would you please full the forms" ; }
ob_end_flush()
?>
the script become like that right
but it gaves error
PHP Code:
Parse errorsyntax errorunexpected T_IF in C:\wamp\www\news\log2.php on line 3 
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