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] 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>"; Link to comment https://forums.phpfreaks.com/topic/214879-self-post/#findComment-1117835 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.