While I know cookies are very basic. I have worked with them in Java script a bit. I have not worked with them in PHP. In fact I know little about PHP but I am finding this challenge fun.
I have found examples of how to set and retrieve data from a cookie using PHP but I am not sure where to put the code. when a client creates a new ticket from the post.php page I see some check but not the data being processed. in the open.inc.php file I see the form created and I can add the following code to read the data from the cookie. and the next line to set a cookie.
Code:
<input type="text" name="email" size="25" value="<?php echo isset($_COOKIE('myemail'))? $_COOKIE('myemail') : " " ?>">
setcookie('myemail',$txt);
Problem is based on the code all ready there, it does a check if the user is logged in.
Code:
<?if ($thisclient && ($email=$thisclient->getEmail())) {
?>
<input type="hidden" name="email" size="25" value="<?=$email?>"><?=$email?>
<?}else {?>
<input type="text" name="email" size="25" value="<?=$info['email']?>">
<?}?>
Could some one give me a hand in guiding me to a solution? All I want is the user with out logging in to check a ticket to have a cookie populate the name and email text boxes when they go to enter a new ticket.
Thanks
ZeroEffect