You'll have to understand that your PHP code will already be finished when Javascript is running. So if you put PHP code into your Javascript conditional, it won't do anything at run time because it will already have been evaluated and executed at page creation time.
You can do the redirection with Javascript only, though
Code:
function show_confirm()
{
var s= confirm("Are you sure?")
if (s==true)
{
window.location.href = "sad52/enrollment.php";
}
}