Jump to content

Cookie


The Sea King

Recommended Posts

How do we make the value of the cookie change when will press submit?

<?php setcookie("username", time()+3600);?><html><body><form action=''>Username: <input type="text" name="user"><br>Password:<input type="password" name"password"><br><input type="submit" value="Log in"></form><?phpif (isset($_COOKIE["username"]))  echo "Welcome " . $_COOKIE["username"] . "!<br />";else  echo "Welcome guest!<br />";?>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...