In common.php I am using a function mail to send the info to me. Evyerthing is working fine, except of the checkbox verification. I want to check in common.php if the checkobx is checked or not in the contact form.
Have tried: If ($_POST[mailback] == "on") { // checkbox checked @mail( $sSender, $sTopic, $sMailContent, 'From: '.$sSender); /* Mail to customer */ } else { // checkbox empty }
It is very interesting, a year ago I've created a contact form with the SAME variable names. But, in the first line it is enough to write: if(isset($_POST['mailback'])){ ... and in the header part 'From:' I would set my own e-mail address. So the customer can see where from the e-mail came. In your case he will see himself as sender. Exchange $sSender with $GLOBALS['config']['orders_email']