I have the following codes, I wanted to show a message box when the value in month (in the textbox) is less than the value of $month (date("n")), when the next button is clicked. When I run my code, the next button disappears! Please help me to solve my problem. Thanks in advance!
<?php
$month = date("n");
?>
<br><font face = " century gothic" color = "#FFFC17" size = "2">Month:
<input name="addnum" type="text" placeholder= <?php echo $month ?> size = "1" id = "month">
<input type="submit" name="Submit" id="next" value=" Next " onClick="
<?php
if(document.getElementById('month') < $month){
alert('That month has already passed! Please put a valid month.');
}
?>
">