Steveinid
-
Posts
14 -
Joined
-
Last visited
Community Answers
-
Steveinid's post in I can't get the right result was marked as the answer
Give this a try for your code:
<?php if (!isset($_POST['age'])) { echo 'enter a valid age'; } else { $age = $_POST['age']; if($age >=18) { echo "you can vote!!!"; } else { echo "You are not allowed to vote"; } } ?>