Cookie Testing

bool setcookie(string name[,striung value[,int expire[,string path, string domain[, string secure]]]])


<?php

if(!isset($_COOKIE['ordering'])){
setcookie("Ordering",$_POST['ChangeOrdering'],time()+31536000);
}
?>

<form method="POST" action="mbprefs.php">
reorder message:
<select name="ChangeOrdering">
<option value="DateAdded ASC">Oldest First</option>
<option value="DateAdded DESC">Newset First</option>
<option value="Title ASC">By Title A-Z</option>
<option value="Title DEC">By title Z-A</option>
</select>
<input type="submit" value="save settings"/>
</form>

 

It would be a great help, if you support by sharing :)
Author: zakilive

Leave a Reply

Your email address will not be published. Required fields are marked *