cearlp Posted 10 hours ago Share Posted 10 hours ago Validate function is within a <script language=javascript> and is ----- function Validate() { if (document.form1.password.value == "zxyzz") { window.location="<?php echo 'disp.php'; ?>"; return(false); } else { window.location="<?php echo 'displess.php'; ?>"; return(false); } } Body is--- <body onload="self.focus();document.form1.password.focus()" > <form name= "form1" method="post" onsubmit="return Validate()"> <table width="1000" border="0" cellspacing="1" cellpadding="0"> <tr> <td align= "right">Password: </td> <td><input size="20" maxlength="20" name="password" value'" "></td> </tr> </table> </form> </body> Problem is that under Firefox it always goes to displess.php but under Safari typing in zxyzz it goes to disp.php, anything else goes to displess.php Any suggestions or evidence of errors will be appreciated. Quote Link to comment https://forums.phpfreaks.com/topic/326524-php-form-coding-works-on-safari-but-not-on-firefox/ Share on other sites More sharing options...
Moorcam Posted 8 hours ago Share Posted 8 hours ago The password value here: <input size="20" maxlength="20" name="password" value'" "> This is wrong. You have a single quote before the double quote. This can lead to issues in different browsers. Quote Link to comment https://forums.phpfreaks.com/topic/326524-php-form-coding-works-on-safari-but-not-on-firefox/#findComment-1647966 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.