I've taken this as an extract of a much larger file.

If $score1 is empty the no score message appears, the exit() occurs. and the footer div will not appear.
If $score1 is filled, the success message and the footer div both appear fine.

If I remove the exit, then both the success and the no score message appears, and the footer div displays fine.

I would like the no score message to appear when $score1 is empty, aswell as the footer div to appear.

How should I restructure my code so that is so?

Any basic examples would be great!


Code:
<input type="text"   name="score1"/>
<input type="text"   name="score2"/>

<?php 
 if(isset($_POST['processForm'])) 
   {
	   $score1 = $_POST['score']; 
	   if (empty($score1)) {echo "You haven't entered a score for score2"; exit();}
	   else if (empty($score2)) {echo "You haven't entered a score for score1"; exit();}
          
#connection here
$sql = "INSERT STATEMENT HERE";
mysql_query($sql);
			
echo "success message";  
   
   };
?>
</form>
<div id="footer">Footer</div>