Results 1 to 5 of 5

Thread: Cookies and Webform

Threaded View

  1. #1

    Thread Starter
    PowerPoster lintz's Avatar
    Join Date
    Mar 2003
    Location
    The 19th Hole
    Posts
    2,697

    Cookies and Webform

    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() ?>">
    Last edited by lintz; Feb 7th, 2006 at 08:42 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width