hello guys im confuse, what is the error in my code
i want to create a dialog box that if the user click true, the user will be directed to an another page
but if false it will stay on the current page
here is my code:
Code:
<script type="text/javascript">
function show_confirm()
{
var s= confirm("Are you sure?")
if (s==true)
{
<? header("Location: sad52/enrollment.php"); ?>
}
else
{
<? header("Location: sad52/studentpage.php"); ?>
}
}
</script>
<br /><input type="button" value="Enroll" onClick="show_confirm()" />
</form>