PHP Email Form not working please help

I am having trouble with my PHP form. Where do I put the email address to receive the content from the contact form

[php]<?php
/*

*/
$userName=$_REQUEST[‘userName’];
$userEmail=$_REQUEST[‘userEmail’];
$userPhone=$_REQUEST[‘userPhone’];
$userMsg=$_REQUEST[‘userMsg’];
$subject = "Message from ".$userName;
$message = ‘’.$subject.'

Email id : ‘.$userEmail.’
Phone No : '.$userPhone.'
Name : '.$userName.'
Says : '.$userMsg.'
'; //$message = "Email id : ".$userEmail. "\r\nPhone No : ".$userPhone."\r\nName : ".$userName."\r\nSays : ".$userMsg; $to=$email_id; $headers = "From: " . strip_tags($userEmail) . "\r\n"; $headers .= "Reply-To: ". strip_tags($userEmail) . "\r\n"; //$headers .= "CC: [email protected]\r\n"; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n"; if(!mail($to, $subject, $message, $headers)){ $mail_status='no'; header("Location: index.html"); exit(); }else{ $mail_status='yes'; header("Location: index.html"); exit();
     } ?>[/php]

Look at line 19.

$to=$email_id;

Could be:

[php]$to=“[email protected]”;[/php]

Using the code as is, you would need to do the same thing somewhere with [php]$email_id ="[email protected]";[/php]

Kinda redundant to add an extra variable that is not needed.

Sponsor our Newsletter | Privacy Policy | Terms of Service