Let say I have a $_SESSION['password'] and a javascript function.
Here's the javascript function:
<script>
function check() {
var password = '<?php echo $_SESSION; ?>';
alert(password);
if (document.FormName.password.value != password)
alert("password does not match");
}
</script>
<html>
//form here
</html>
How come when the alert pop-ups, it will only display nothing? what happened? Is my passing of variable wrong at all?