Curious behavior

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • sheldonlg@gmail.com

    Curious behavior

    I have a php page. On it I have an html control (among others).

    I can have:

    (Line A:)
    <input type="hidden" name="secretkey " value="<?php
    echo $_SESSION['vmPassword'];?> ">

    where $_SESSION['vmPassword'] has the correct value

    or I can do:
    (Line B:)
    <input type="password" name="secretkey " value="<?php
    echo $_SESSION['vmPassword'];?> ">

    If I do Line A and transmit it, the value received for $secretkey looks
    like an encrypted value.
    If I do Line B and type in the value then the value received is the
    correct value. Doing it with Line B with type="password" and having
    the value as is results in a very long string of dots in the field.
    Using value="" results in an initially empty password field.

    I have checked and double checked the value of $_SESSION['vmPassword']
    and it is correct.

    Can someone help?

    What I need to happen is for the password field to be hidden, with the
    proper value put in by the php echo command.

  • sheldonlg@gmail.com

    #2
    Re: Curious behavior

    Solved. It seems that after traversal, the $_SESSION['vmPassword']
    value was getting corrupted somewhere. Using a local value set to
    $_SESSION['vmPassword'] somehow removed the corruption of the session
    value. It probably corrupted the local value (somehow????), but since
    it was reset each time, I didn't care.

    Comment

    Working...