Forum Moderators: coopster
Thanks!
- Kevin Neberman
To set cookies you can use the setcookie [php.net] function.
Once the cookie is set, you can do something like this for the username input field:
<input type="text" name="username" value="<?php echo (isset($_COOKIE['username']))?$_COOKIE['username']:'';?>" />
Try that out and see where you get. By the way, the above uses the ternary operator: [php.net...]
<?php
$value = 'mysite';
setcookie(username,$row_user['username'],)
setcookie(password,$row_user['password'],)
?>
this is on a page that has session data on it already so I was hoping that I could throw in the session data for username and password from the database but it didn't seem to work..
setcookie("username", $row_user['username'], time()+36000);
setcookie("password", $row_user['password'], time()+36000);
Try the above and see what you get.