plz help i want to use the text i enter in password that after clicking button become in id=”demo” to php symbol $t
here is the code
<html>
<body>
Password: <input type=”password” id=”myPsw” value=”2″>
<button onclick=”myFunction()”>Try it</button>
<script>
function myFunction() {
var x = document.getElementById(“myPsw”).value;
document.getElementById(“demo”).innerHTML = x;
}
</script>
<?php
$t =the_demo(); // the problem is here
if ( $t < “10”) {
echo “Have a good morning!”;
} elseif ($t < “20”) {
echo “Have a good day!”;
} else {
header(“Location: http://google.com”);
die();
}
?>
</body>
</html>