cooldude832 Posted November 20, 2007 Share Posted November 20, 2007 I have a month number coming in from get $_GET['month'] and I want to verify it is in proper form any ideas beyond <?php if($_GET['month'] >0 && $_GET['month'] <13 && is_int($_GET['month'])) ?> ?? Quote Link to comment Share on other sites More sharing options...
PHP_PhREEEk Posted November 20, 2007 Share Posted November 20, 2007 $_GET will not be an integer until you set it as an integer. All POSTed or GET values are strings at first, so.. <?php $month = intval($_GET['month']); if( $month > 0 && $month <13 ) { //do whatever } ?> PhREEEk Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.