I successfully installed your form script.
The only issue I have is getting the to and from in check. We need the from and subject to read the actual info instead of the general"message from website"
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The php mail() function can accomodate these changes. Look for the line in your process.php file that starts with mail(...
Visit this site for more info on the mail() function. Let me know if you still can't figure it out. http://www.w3schools.com/php/php_mail.asp
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for your help. Unfortunately, it gives the wrong email address now. It uses my name and the hoosts default address.
It also does not include the message "From: $Name".
I have tried everything.....nothing is working right.
Here is the process----------------------------
<?php
include("global.inc.php");
$errors=0;
$error="The following errors occured while processing your form input.<ul>";
pt_register('POST','Name');
pt_register('POST','HomePhone');
pt_register('POST','CellPhone');
pt_register('POST','WorkPhone');
pt_register('POST','EmailAddress');
pt_register('POST','WhatStatedoyoulivein');
pt_register('POST','YourSign');
pt_register('POST','DateofBirth');
pt_register('POST','BirthPlace');
pt_register('POST','TimeofBirth');
pt_register('POST','NowgivemeInformationaboutyourPartner');
pt_register('POST','PartnersName');
pt_register('POST','PartnersSign');
pt_register('POST','PartnersDateofBirth');
pt_register('POST','PartnersBirthPlace');
pt_register('POST','PartnersTimeofBirth');
pt_register('POST','YourQuestionsforAmy');
$YourQuestionsforAmy=preg_replace("/(\015\012)|(\015)|(\012)/"," <br />", $YourQuestionsforAmy);pt_register('POST','BestTimeforAmytocallyou');
if($Name=="" || $HomePhone=="" || $EmailAddress=="" || $BestTimeforAmytocallyou=="" ){
$errors=1;
$error.="<li>You did not enter one or more of the required fields. Please go back and try again.";
}
if(!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$EmailAddress)){
$error.="<li>Invalid email address entered";
$errors=1;
}
if($errors==1) echo $error;
else{
$where_form_is="http".($HTTP_SERVER_VARS["HTTPS"]=="on"?"s":"")."://".$SERVER_NAME.strrev(strstr(strrev($PHP_SELF),"/"));
$message="Name: ".$Name."
Home Phone: ".$HomePhone."
Cell Phone: ".$CellPhone."
Work Phone: ".$WorkPhone."
Email Address: ".$EmailAddress."
What State do you live in: ".$WhatStatedoyoulivein."
Your Sign: ".$YourSign."
Date of Birth: ".$DateofBirth."
Birth Place: ".$BirthPlace."
Time of Birth: ".$TimeofBirth."
Now give me Information about your Partner: ".$NowgivemeInformationaboutyourPartner."
Partners Name: ".$PartnersName."
Partners Sign: ".$PartnersSign."
Partners Date of Birth: ".$PartnersDateofBirth."
Partners Birth Place: ".$PartnersBirthPlace."
Partners Time of Birth: ".$PartnersTimeofBirth."
Your Questions for Amy: ".$YourQuestionsforAmy."
Best Time for Amy to call you: ".$BestTimeforAmytocallyou."
";
$message = stripslashes($message);
mail("info@astrologicalcompatibility.com, webmaster@astrologicalcompatibility.com","From: $email",$message,"From: $Name ");
header("Refresh: 0;url=http://www.astrologicalcompatibility.com/thanks.htm");
?><?php
}
?>
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I successfully installed your form script.
The only issue I have is getting the to and from in check. We need the from and subject to read the actual info instead of the general"message from website"
The php mail() function can accomodate these changes. Look for the line in your process.php file that starts with mail(...
Visit this site for more info on the mail() function. Let me know if you still can't figure it out.
http://www.w3schools.com/php/php_mail.asp
Thanks for your help. Unfortunately, it gives the wrong email address now. It uses my name and the hoosts default address.
It also does not include the message "From: $Name".
I have tried everything.....nothing is working right.
Here is the process----------------------------
<?php
include("global.inc.php");
$errors=0;
$error="The following errors occured while processing your form input.<ul>";
pt_register('POST','Name');
pt_register('POST','HomePhone');
pt_register('POST','CellPhone');
pt_register('POST','WorkPhone');
pt_register('POST','EmailAddress');
pt_register('POST','WhatStatedoyoulivein');
pt_register('POST','YourSign');
pt_register('POST','DateofBirth');
pt_register('POST','BirthPlace');
pt_register('POST','TimeofBirth');
pt_register('POST','NowgivemeInformationaboutyourPartner');
pt_register('POST','PartnersName');
pt_register('POST','PartnersSign');
pt_register('POST','PartnersDateofBirth');
pt_register('POST','PartnersBirthPlace');
pt_register('POST','PartnersTimeofBirth');
pt_register('POST','YourQuestionsforAmy');
$YourQuestionsforAmy=preg_replace("/(\015\012)|(\015)|(\012)/"," <br />", $YourQuestionsforAmy);pt_register('POST','BestTimeforAmytocallyou');
if($Name=="" || $HomePhone=="" || $EmailAddress=="" || $BestTimeforAmytocallyou=="" ){
$errors=1;
$error.="<li>You did not enter one or more of the required fields. Please go back and try again.";
}
if(!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$EmailAddress)){
$error.="<li>Invalid email address entered";
$errors=1;
}
if($errors==1) echo $error;
else{
$where_form_is="http".($HTTP_SERVER_VARS["HTTPS"]=="on"?"s":"")."://".$SERVER_NAME.strrev(strstr(strrev($PHP_SELF),"/"));
$message="Name: ".$Name."
Home Phone: ".$HomePhone."
Cell Phone: ".$CellPhone."
Work Phone: ".$WorkPhone."
Email Address: ".$EmailAddress."
What State do you live in: ".$WhatStatedoyoulivein."
Your Sign: ".$YourSign."
Date of Birth: ".$DateofBirth."
Birth Place: ".$BirthPlace."
Time of Birth: ".$TimeofBirth."
Now give me Information about your Partner: ".$NowgivemeInformationaboutyourPartner."
Partners Name: ".$PartnersName."
Partners Sign: ".$PartnersSign."
Partners Date of Birth: ".$PartnersDateofBirth."
Partners Birth Place: ".$PartnersBirthPlace."
Partners Time of Birth: ".$PartnersTimeofBirth."
Your Questions for Amy: ".$YourQuestionsforAmy."
Best Time for Amy to call you: ".$BestTimeforAmytocallyou."
";
$message = stripslashes($message);
mail("info@astrologicalcompatibility.com, webmaster@astrologicalcompatibility.com","From: $email",$message,"From: $Name ");
header("Refresh: 0;url=http://www.astrologicalcompatibility.com/thanks.htm");
?><?php
}
?>
Never mind. I figured it out :)
I guess it would help if I used uppercase letters like in the form fields....duh!
Thanks a million!