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?
<input type="text" name="score"/>
<?php
if(isset($_POST['processForm']))
{
$score1 = $_POST['score'];
if (empty($score1)) {echo "You haven't entered a score for score"; exit();
}
#connection here
$sql = "INSERT STATEMENT HERE";
mysql_query($sql);
echo "success message";
};
?>
</form>
<div id="footer>...
Edited by wright67uk, 20 January 2013 - 10:24 AM.












