1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

hide password from page source

Discussion in 'PHP' started by omerta, Jan 2, 2008.

  1. #1
    Hi I'm a new member and beginner in php, too.

    I have a form in html sth like this:

    <form id="form1" name="eggrafi" method="post" action="signup.php">
    <label>
    <input type="text" name="name" id="textfield" />
    </label>
    <label>
    <input name="password" type="password" id="textfield2" value="" />
    </label>
    <label>
    <input type="submit" name="submit" id="button" value="Εγγραφή" />
    </label>
    </form>

    the user press the submit button and the signup.php opens.
    in case someone do not write sth in the field "name" of the form i have the php code:

    if($_POST["name"]==NULL)
    {
    include("arxeio.html");
    }

    At last in file arxeio.html i have sth like this:

    <label>
    <input type="text" name="name" id="textfield" />
    </label>
    <input name="password" type="password" id="textfield2" value="<?php echo $_POST["password"]; ?>" />

    I do that because someone who give the password but not the username will have the opportunity to file arxeio.html to give only username and not the password again.

    it works fine BUT if someone go to view->page source of the file arxeio.html he can see the password.

    My question is how i can hide the password?
     
    omerta, Jan 2, 2008 IP
  2. omerta

    omerta Peon

    Messages:
    19
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    is there any problem ,generally, with that?

    if in the page source the password appears?

    it appears only in this page... (arxeio.html)

    any solution with cookies?
     
    omerta, Jan 2, 2008 IP
  3. commandos

    commandos Notable Member

    Messages:
    3,648
    Likes Received:
    329
    Best Answers:
    0
    Trophy Points:
    280
    #3
    he would only see it , if he typed it , so its ok for him to see it , since he know it ...
     
    commandos, Jan 2, 2008 IP
  4. omerta

    omerta Peon

    Messages:
    19
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    that's right...:eek: thanks my friend
     
    omerta, Jan 2, 2008 IP
  5. bippi1776

    bippi1776 Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    [h=1]will any1 find the password/code from "http://bit.ly/passwordunlock" coz i can't find nything in page source i get very frustated.. plz help me.. :( :mad:[/h]
     
    bippi1776, Dec 3, 2012 IP
  6. Rukbat

    Rukbat Well-Known Member

    Messages:
    2,908
    Likes Received:
    37
    Best Answers:
    51
    Trophy Points:
    125
    #6
    Not without seeing the code that's on the server - which we can't do.
     
    Rukbat, Dec 4, 2012 IP