Jump to content

can u help mw with that


HAN!

Recommended Posts

it just seem that the variables are not transferring from php into javascript, so can u take a look and see if i have somthing missing thank u;

<?PHP 
$user='hani';
$pass='annd';
?>
<script language="JavaScript"> 
<!-- 
function validate(form) {
var u=<?PHP echo '$user'; ?>
var p=<?PHP echo '$pass'; ?>


if (form.username.value!=u)
)
{
alert("Please enter the correct username");
form.username.focus();
return false;
}
if(form.password.value!=p)
{
alert("Please enter the correct password");
form.password.focus();
return false;
}
}
//--> 
</script>
</head>

Link to comment
https://forums.phpfreaks.com/topic/74555-can-u-help-mw-with-that/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.