will_1990 Posted December 11, 2008 Share Posted December 11, 2008 i wish to use a checkbox with this code <?php $one_way = (isset($_POST['one_way'])) ? $_POST['one_way'] : null; I want to follow after a while statement and say if checkbox is not null execute "query" then do exactly the same while loop as above. if more code or info is needed dont hesitate to ask. Im just not sure how to structure the if statement. thanks alot Link to comment https://forums.phpfreaks.com/topic/136567-using-a-check-box-with-an-if-statement/ Share on other sites More sharing options...
premiso Posted December 11, 2008 Share Posted December 11, 2008 <?php $one_way = (isset($_POST['one_way'])) ? $_POST['one_way'] : null; if (!is_null($one_way)) { //execute query in here. } ?> Link to comment https://forums.phpfreaks.com/topic/136567-using-a-check-box-with-an-if-statement/#findComment-712890 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.