View Single Post
Old 01-01-2008, 01:55 PM   #1 (permalink)
webtuto
The Addict
 
webtuto's Avatar
 
Join Date: Dec 2007
Location: morocco
Posts: 221
Thanks: 19
webtuto is on a distinguished road
Plugin/Addon [Solved] Cookies douesnt register why why !!!!!

hi

MY SCRIPT STAND ON THIS
FOR NOW I DONT CARE ABOUT SECURITY THATS WILL COME LATER
here is another problem that i had in my news script

here is the code

PHP Code:
<?php
if (!empty($_POST[name]) and !empty($_POST[pass]) ) {
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" ; }
?>
but the cookie douesnt register and it gaves this error
PHP Code:
WarningCannot modify header information headers already sent by (output started at C:\wamp\www\news\log2.php:1in C:\wamp\www\news\log2.php on line 10

Warning
Cannot modify header information headers already sent by (output started at C:\wamp\www\news\log2.php:1in C:\wamp\www\news\log2.php on line 11 
so whats the problem !!

Last edited by webtuto : 01-04-2008 at 06:03 PM.
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