Problem with form

3 posts by 2 authors in: Forums > CMS Builder
Last Post: October 18, 2010   (RSS)

Re: [paulmac] Problem with form

By Chris - October 18, 2010

Hi paulmac,

Normally, the solution is to simply add a @ before the variable, but since this these variables are inside a string, that's not possible.

A simple solution is to force your variables to be defined before you use them:

// force checkbox fields to be defined
$_REQUEST['area_interest1'] = @$_REQUEST['area_interest1'];
$_REQUEST['area_interest2'] = @$_REQUEST['area_interest2'];
$_REQUEST['area_interest3'] = @$_REQUEST['area_interest3'];
$_REQUEST['area_interest4'] = @$_REQUEST['area_interest4'];
$_REQUEST['area_interest5'] = @$_REQUEST['area_interest5'];
$_REQUEST['area_interest6'] = @$_REQUEST['area_interest6'];


Add that code anywhere above your $message = <<<__TEXT__ line.

I hope this helps. Please let me know if you have any questions.
All the best,
Chris

Re: [chris] Problem with form

By paulmac - October 18, 2010

Worked perfect. Thanks Chris!