What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » php cookie help [solved]

php cookie help [solved]
Author: Message:
Ezra
Veteran Member
*****

Avatar
Forgiveness is between them and God

Posts: 1960
Reputation: 31
37 / Male / Flag
Joined: Mar 2003
O.P. Grin  php cookie help [solved]
I'm learning php now, and i'm trying to set cookie's, but it won't work :S

code:
<form action="cookie.php" method="post">
<input type="text" name="naam" value="<?php $_COOKIE["naam"] ?>">
<input type="submit" value="Cookie Instellen" name="Submit">
<input type="button" onClick="<?php setcookie ("Naam","",time()-3600)?>" value="Cookie Wissen">
</form>

<?php
//cookies instellen
setcookie ("Naam", $_POST["naam"],time()+86400);  /* onthoud naam voor 24 uur*/
setcookie ("Ipadres", $_SERVER["REMOTE_ADDR"], time()+86400); /*onthoud ip voor 24 uur */

//dingen naar de pagina printen
print "Als je binnen 24 uur op deze pagina terugkomt, weet het script je naam nog en je ipadres";
print "<br>" . "Naam: " . $_COOKIE["naam"] . "<br>" . "Ip-adres: " . $_COOKIE["Ipadres"];

?>

Does anyone know what i'm doing wrong?

This post was edited on 03-07-2005 at 11:33 PM by Ezra.
[Image: 1-0.png]
             
03-07-2005 10:13 PM
Profile PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
php cookie help [solved] - by Ezra on 03-07-2005 at 10:13 PM
RE: php cookie help - by L. Coyote on 03-07-2005 at 10:24 PM
RE: php cookie help - by Ezra on 03-07-2005 at 10:28 PM
RE: php cookie help - by L. Coyote on 03-07-2005 at 10:36 PM
RE: php cookie help - by Ezra on 03-07-2005 at 10:41 PM
RE: php cookie help - by Plik on 03-07-2005 at 10:45 PM
RE: php cookie help - by L. Coyote on 03-07-2005 at 10:46 PM
RE: php cookie help - by Ezra on 03-07-2005 at 10:50 PM
RE: php cookie help - by Plik on 03-07-2005 at 10:55 PM
RE: php cookie help - by L. Coyote on 03-07-2005 at 10:57 PM
RE: php cookie help - by Ezra on 03-07-2005 at 11:00 PM
RE: php cookie help - by Plik on 03-07-2005 at 11:12 PM
RE: php cookie help - by L. Coyote on 03-07-2005 at 11:16 PM
RE: php cookie help - by Ezra on 03-07-2005 at 11:23 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On