jsquarepants Posted October 1, 2010 Share Posted October 1, 2010 Why does this not display $PassWord, every? <?php if(isset($_POST['form']) && $_POST['form']=='true') { $PassWord = "<font color=\"red\">" . MD5('$_POST[PassWord]'). "<br/></font>"; } ?> <html> <head><title>Create Password</title></head> <body> <form action="create_password.php" method="post"> <table width="300" border="0" cellspacing="0" cellpadding="2"> <tr><td>Password:</td><td><input type="password" name="PassWord" /></td></tr> <tr><td colspan="2"><center><input type="submit" value="Create" /></center></td></ tr> </table> </form> <?PHP if ($PassWord = "") { $Password = "PassWord"; } echo $PassWord; ?> </body> </html> [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/214879-self-post/ Share on other sites More sharing options...
trq Posted October 1, 2010 Share Posted October 1, 2010 Variables are not interpolated within single quotes. $PassWord = "<font color=\"red\">" . MD5('$_POST[PassWord]'). "<br/></font>"; should be.... $PassWord = "<font color=\"red\">" . MD5($_POST['PassWord']). "<br/></font>"; Quote Link to comment https://forums.phpfreaks.com/topic/214879-self-post/#findComment-1117835 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.