i am trying to make a cookie for a php script. For the form i have
<center>
<form action="home.php" method="get">
<fieldset>
<label>Please enter your name</label>
<input type="text" name="user" />
<button type="submit">
Submit
</button>
</fieldset>
</form>
<p><a href="home.php"> Skip this.</a></p>
</center>
i named that index.html
then on another page i put
<?php
$user = $_REQUEST["user"] ;
print "<h2>Hi, $user! </h2>"
?>
and called it home.php
how do i write a cookie for this so the site remembers the user?
i tried googleing it, but nothing that worked came up. please help me
<center>
<form action="home.php" method="get">
<fieldset>
<label>Please enter your name</label>
<input type="text" name="user" />
<button type="submit">
Submit
</button>
</fieldset>
</form>
<p><a href="home.php"> Skip this.</a></p>
</center>
i named that index.html
then on another page i put
<?php
$user = $_REQUEST["user"] ;
print "<h2>Hi, $user! </h2>"
?>
and called it home.php
how do i write a cookie for this so the site remembers the user?
i tried googleing it, but nothing that worked came up. please help me