SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Dec 2005
    Posts
    88
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy Need help to encrypt password

    I have this little script that encrypts passwords. The problem I have is that I am getting this error message

    'Undefined variable: pass '

    The code is
    PHP Code:
    <?php
    $passwd 
    "jane";
    $pass_new md5($pass);
    echo 
    $pass_new;
    ?>
    Please can someone help me.

    Vonz

  2. #2
    SitePoint Guru
    Join Date
    Jul 2005
    Location
    Orlando
    Posts
    634
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In the first line, you're setting the password variable name to "passwd"

    But on the second line, you're encrypting the variable name "pass".

    Change one of those to match the other.

  3. #3
    SitePoint Enthusiast
    Join Date
    Dec 2005
    Posts
    88
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Oh how obvious. thank you so much in a bit of a panic.

    Please pardon a novice programmer's mistake.

    Vonz


Bookmarks

Posting Permissions

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