password generation script

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • dave

    password generation script

    Hello,
    I'm trying to get this password generator to work. I keep getting
    brought back to the original page, never to the page which says what my
    password will be in encrypted format. I'm running php4 and apache2 on a
    FreeBSD system if it matters.
    Any help appreciated.
    Thanks.
    Dave.

    <html>
    <head>
    <title>Passwo rd Creator</title>
    </head>
    <body>
    <form action="generat ing_passwords.p hp" method="post">
    <h3>Enter a password to create MD5 and Crypt based passwords.</h3>
    Password: <input type="text" name="password" >
    <input type="submit" name="create" value="Create Passwords!">
    </form>
    </body>
    </html>
    <?
    if(isset($passw ord)) {
    ?>
    <html>
    <head>
    <title>your password</title>
    </head>
    <body>
    <h3>The passwords for the string "<?=$password?> " are:</h3>
    <ul>
    <li><b>MD5:</b> <?=md5($passwor d)?>
    <li><b>Crypt: </b> <?=crypt($passw ord)?>
    </ul>
    <?
    }
    ?>
    </body>
    </html>


  • Ian.H

    #2
    Re: password generation script

    On Mon, 16 Aug 2004 18:36:13 +0000, dave wrote:
    [color=blue]
    > Hello,
    > I'm trying to get this password generator to work. I keep getting
    > brought back to the original page, never to the page which says what my
    > password will be in encrypted format. I'm running php4 and apache2 on a
    > FreeBSD system if it matters.
    > Any help appreciated.
    > Thanks.
    > Dave.
    >
    > <html>
    > <head>
    > <title>Passwo rd Creator</title>
    > </head>
    > <body>
    > <form action="generat ing_passwords.p hp" method="post">
    > <h3>Enter a password to create MD5 and Crypt based passwords.</h3>
    > Password: <input type="text" name="password" >
    > <input type="submit" name="create" value="Create Passwords!">
    > </form>
    > </body>
    > </html>
    > <?
    > if(isset($passw ord)) {[/color]


    [ snip ]


    And the reason you haven't RTFM is?

    Go and read.. then answer your own damn FAQ.

    There's also this site I keep hearing about.. what's it's name.. umm.. ahh
    yeah, google!



    Ian

    --
    Ian.H
    digiServ Network
    London, UK


    Comment

    • Andy Hassall

      #3
      Re: password generation script

      On Mon, 16 Aug 2004 18:36:13 GMT, "dave" <dmehler26@woh. rr.com> wrote:
      [color=blue]
      >if(isset($pass word)) {[/color]

      What makes you think $password is ever set?

      (Hint: if it's a book or tutorial, bin it and read the PHP manual. Well, maybe
      not bin it, but be prepared to change a lot of code.)

      --
      Andy Hassall / <andy@andyh.co. uk> / <http://www.andyh.co.uk >
      <http://www.andyhsoftwa re.co.uk/space> Space: disk usage analysis tool

      Comment

      • Matthias Esken

        #4
        Re: password generation script

        dave schrieb:
        [color=blue]
        > <?[/color]

        <?php
        [color=blue]
        > if(isset($passw ord)) {[/color]

        if (isset($_POST['password'])) {
        [color=blue]
        > <li><b>MD5:</b> <?=md5($passwor d)?>[/color]

        <li><b>MD5:</b> <?php echo(md5($passw ord)) ?>


        Please read the documentation and don't rely on the knowledge from 2002.

        Regards,
        Matthias

        Comment

        Working...