Im trying to get it so when you click yes it will execute this PHP code. However im getting a php error. But I have errors turned off and I cant turn them on so I need to find it myself...
Here is my code if someone can figure it out that would be great...
Its somewhere in this small section... This is only part of it so yes I have PHP tags around it...
Code: Select all
echo 'Welcome ';
echo $_SESSION['username'];
echo '<br><br>';
echo '
<script type="text/javascript">
function disp_confirm()
{
var r=confirm("Are sure you want to logout?");
if (r==true)
{
document.write("
if (isset($_SESSION["db_is_logged_in"])) {
unset($_SESSION["db_is_logged_in"]);
}");
}
else
{
document.write("");
}
}
</script>
}
<input type="button" onclick="disp_confirm()" value="Logout" />
';