Hi, I have a message box being echoed with php that if a user doesn’t upload a file this pops up and ask them if they are sure they want to submit without uploading files. However the problem that stands is the form still submits even if they click yes. If yes is clicked I just want it to go back to the form so they can choose to upload it again. I want it to exit out of the php script and not submit anything… this is what I have so far…
[php]if( $_FILES[‘ppm’][‘type’] == “”)
{
echo "
var answer = confirm('Are you sure you do not want to upload any PPM or OM materials? This document could help the RSIC staff better process your request');
if(answer)
{
window.location('url...');
<?php exit(); ?>
}
</script>
";
}
[/php]
This creates a problem however the script below this code still executes and stores the information inside the database and I can’t have that…