Hello All, after many hours of searching, I am unable to find a result for my question.
I am trying to run a php script that I have used many times but now I am trying to use the same script through a new hosting company that I have never worked w/ before and even though the script is working fine, I keep getting a ton of errors.
I am guessing it is something w/ the php.ini file and error handeling but I can not find want I am looking for.
Here is a sample of the errors it is generating:
Notice: Undefined variable: msg in D:\WWWRoot\caredata.med.pro\www\sendDEMO.php on line 2
Notice: Undefined index: hardcopy in D:\WWWRoot\caredata.med.pro\www\sendDEMO.php on line 5
Notice: Undefined index: info_email in D:\WWWRoot\caredata.med.pro\www\sendDEMO.php on line 6
Here is the php code (simple mailing script):
<?
$msg .= "Here is a new Demo response\n";
$msg .= "\n";
$msg .= "NEWSLETTER:\n\n";
$msg .= "Hardcopy:-------------------------------$_POST[hardcopy]\n";
$msg .= "Email:----------------------------------$_POST[info_email]\n";
$msg .= "\n";
$msg .= "\n";
$msg .= "REQUEST MORE INFORMATION:\n\n";
$msg .= "INFO:-----------------------------------$_POST[info]\n";
$msg .= "\n";
$msg .= "\n";
$msg .= "3 QUESTIONS TO COST SAVINGS:\n\n";
$msg .= "Patients Needing Follow-up Each Day:----$_POST[followup]\n";
$msg .= "New Patients Each Day:------------------$_POST[newpatients]\n";
$msg .= "Rate of Person Doing Follow-up:---------$_POST[rateofpay]\n";
$msg .= "\n";
$msg .= "\n";
$msg .= "CONTACT INFO:\n\n";
$msg .= "First Name:-----------------------------$_POST[first]\n";
$msg .= "Last Name:------------------------------$_POST[last]\n";
$msg .= "Role:-----------------------------------$_POST[role]\n";
$msg .= "Company Name:---------------------------$_POST[comp]\n";
$msg .= "Company Website:------------------------$_POST[compurl]\n";
$msg .= "Address1:-------------------------------$_POST[ad1]\n";
$msg .= "Address2:-------------------------------$_POST[ad2]\n";
$msg .= "City:-----------------------------------$_POST[city]\n";
$msg .= "Zip:------------------------------------$_POST[zip]\n";
$msg .= "State:----------------------------------$_POST[state]\n";
$msg .= "Country:--------------------------------$_POST[country]\n";
$msg .= "Phone Number:---------------------------$_POST[phone]\n";
$msg .= "Phone Ext.:-----------------------------$_POST[ext]\n";
$msg .= "email:----------------------------------$_POST[email]\n";
$msg .= "How They Heard About Your:--------------$_POST[howheard]\n\n";
$to = "me@you.biz";
$subject = "Demo Response";
$mailheaders = "From: $_POST[email]\n";
$mailheaders .= "Reply-to: $_POST[email]\n\n";
mail ($to, $subject, $msg, $mailheaders);
?>
As stated before, I have used this script multiply times w/ no errors. Also, they are using - PHP 4.3.4.
One more thing - it is not just this snippet of .php code. All php coding I have used throughout the site is generating the same errors/notices/undefined variable.
As always, Many Thanks in advance.
Best,
J.