Jump to content


Editing Cookies

  • Please log in to reply
2 replies to this topic

#1 Cloud9247

  • Members
  • PipPip
  • Member
  • 20 posts
  • LocationMy Computer

Posted 06 April 2006 - 06:47 PM


I made an edit profile script for my membership system on my site, and when you edit your profile, it says ""Your profile has been edited successfully", but when I go back to the edit profile script, it shows the cookies in their old form, here is what I have tried:

$_COOKIE['cookie'] = $_POST['post'];

It works, yes, but it does not appear editted till you log out, and log back in. Can someone please help me with this problem?!

#2 ToonMariner

  • Members
  • PipPipPip
  • Advanced Member
  • 3,342 posts
  • LocationNewcastle upon Tyne, UK

Posted 06 April 2006 - 07:45 PM

do you not have to use setcookie(); to actually alter cookie values???

follow me on twitter @PHPsycho

#3 wildteen88

  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 06 April 2006 - 08:26 PM

In order to edit a cookie you will have to reset it using the setcookie function. You cannot do $_COOKIE['cookiename'] = 'something';
to reset a cookie.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users