TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 01-01-2008, 01:55 PM   #1 (permalink)
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
 



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 01:19 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design