wirehopper, thank you for your response, The reason that I use a autoresponder is mainly to keep track of how my campain is doing. Track statistics for my future referrence. :-)
Hi Jcbones, I hope you are doing well.
I am confused again. In the "CASE" string should I put the page name in both areas: case 'page1':
$file = 'page1.html';
Or only after "case"?
Also how will the code be able to define what salesleter (page) to call for the different main question options?
Will this portion of the code need a actual filename?:
if(empty($other)) {
$fieldname="other"; //I do not know what fieldname is, as it isn't passed or declared.
$mainquestion="other";
I apologise for so many questions. my coding skills are close to 0
Tony S.
if(empty($other)) { $fieldname="other"; //I do not know what fieldname is, as it isn't passed or declared. $mainquestion="other"; }
//REPLACE THE "CASE" STRING WITH THE NAME OF YOUR SCRIPTS. //switch is used for sanitation so someone cannot access files they are not suppose to.
/* SWITCH SANITATION * pass variable $mainquestion * if the variable matches a case, * That block of code will run. * If it doesn't match a case, * Then the default block of code will * run. */ switch($mainquestion) { case 'business': $file = 'business.html'; break; case 'products': $file = 'products.html'; break; case 'affiliates': $file = 'affiliates.html'; break; default: $file = 'other.html'; }
if(empty($other)) { $fieldname="other"; //I do not know what fieldname is, as it isn't passed or declared. $mainquestion="other"; }
include('validator.php'); $mail = new EmailAddressValidator; $subject = 'Thanks for your request.'; $message = 'This is the message to be sent in the email.'; $email = $from; $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers .= 'From:Wbste <publicrelations@mysite.com>'. "\r\n";
if($mail->check_email_address($email)) { if(mail($email,$subject,$message,$headers)) echo "Mail sent to $email!"; else echo "Mail sent to $email failed!"; } else { echo 'You did not specify a valid email address.'; } //REPLACE THE "CASE" STRING WITH THE NAME OF YOUR SCRIPTS. //switch is used for sanitation so someone cannot access files they are not suppose to.
/* SWITCH SANITATION * pass variable $mainquestion * if the variable matches a case, * That block of code will run. * If it doesn't match a case, * Then the default block of code will * run. */ switch($mainquestion) { case 'business': $file = 'business.html'; break; case 'products': $file = 'products.html'; break; case 'affiliates': $file = 'affiliates.html'; break; default: $file = 'other.html'; }
Jcbones thank you and wirehopper both for your considerable help with this coding problem. As I stated before my php coding knowledge is very limeted. It seems the more help tha i get the more confused I get. It will take me some time to digest the information that you have given me then intergrate it into my program. You have been very helpful and i will get back to you on how the revisions have worked out. Again I want to thank you for your assistance. Your help is welcome as well as appreciated.
wirehopper, That is great advice, Sometimes things seem a little overwhelming. It wouyld seem best to approach it differenyly. In this case one element at a time as opposed to trying to figure it all out in one big project. Thank you for your help, I will definitely use your advice. :-)