Youssouf Posted February 25, 2014 Share Posted February 25, 2014 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. Link to comment https://forums.phpfreaks.com/topic/286501-add-%E2%80%9Cif-checked%E2%80%9D-functions-to-implode-for-php/ Share on other sites More sharing options...
davidannis Posted February 25, 2014 Share Posted February 25, 2014 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 Link to comment https://forums.phpfreaks.com/topic/286501-add-%E2%80%9Cif-checked%E2%80%9D-functions-to-implode-for-php/#findComment-1470550 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.