Youssouf Posted February 25, 2014 Share Posted February 25, 2014 (edited) I have contact form using PHP and implode, when I submit the form and a checkbox is not checked it gives error line, i want to know if there is a way to only use implode if the checkbox is checked. Edited February 25, 2014 by Youssouf Quote Link to comment Share on other sites More sharing options...
davidannis Posted February 25, 2014 Share Posted February 25, 2014 (edited) Hard to tell from your question but I think that what you want is: if (!(empty($_REQUEST['checkbox_name_here']))){ // do your implode here } You can change $_REQUEST to $_POST or $_GET if you know how form is submitted. http://www.php.net/empty Edited February 25, 2014 by davidannis 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.