Is there a way I can hide my IF/ELSE results unless the form has been submitted? At the moment when i visit the pge it auto outputs the else statement.
Here is my php:
$height = $_POST['height'] / 100;
$weight = $_POST['weight'];
$bmi = $weight / $height;
$bmi = $bmi / $height;
$total =
$_POST['Radios'] +
$_POST['Radios1'] +
$_POST['Radios3'] +
$_POST['Radios4'] +
$_POST['Radios5'] +
$_POST['Radios6'];
if($total >= 2 || $bmi > 22){
$warning = 'Your ill';
} else {
$safe = 'Your ok';
}
The php is above the html form I am unable to move it to another file(restricted).