Form with Checkboxes

the mail() function

Moderators: macek, egami, gesf

Post Reply
User avatar
php-forum GURU
php-forum GURU
Posts: 2196
Joined: Wed Oct 06, 2010 11:19 am
Location: Happy Valley, UT

Re: Form with Checkboxes

Post by egami » Mon Dec 12, 2011 6:19 am

$ServicesRequired = ''; // set a blank var, otherwise the log file throws an error..

foreach($_POST['ServicesRequired'] as $key => $value) {
$ServicesRequired .= $value."\r\n<br>";

There is no need to do any checking on this variable really, since it's already hard coded.
Or, simply check to make sure that at least one service was checked..

if ($ServicesRequired == '') {
throw your error here..

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests