<?php
echo '<script type="text/javascript">
if(confirm("Your time has expired. Do you want to logout?"))
alert("Five minutes were added on too your session"); //User will five minutes added on
else
alert("You are logged out"); //User will be loged out
</script>';
?>
How do I put in PHP code inside the if statement and else statement. For example, in the if statement I want to do some SQL stuff, then in the else statement I want to again do some SQL stuff and a redirect.