I have a login area on my site and what I want is when a user returns to display their "username" in the login form.
This is my code but it's not picking up the "username" within the saved cookie. (and yes, the cookie exists!)
PHP Code://get username from cookie
function cookie_username() {
$username = $_COOKIE['cookie_name'];
echo "$username";
}
//Then is form
<input type="text" name="username" size="10" maxlength="10" style="font-size: 8pt" value="<?php cookie_username() ?>">




Reply With Quote