Here is what I am trying to do. I want to store that in a variable that is used to send emails in php... my code.
$bps = stripslashes($Comments);
$myemail = 'Chris@mydomain.com';
$bizname = ' My Domain.com';
// hidden field in form value is "order" making this true
if ($form=="order"){
$to = "\"$Title$First_Name $Last_Name\"<$Email>";
$headers = "From: \"My Domain.com\"<$myemail>";
$subject = "Product Order"; // subject of email
$messagetosub="$Title$Last_Name,".'
Thank you so much for ordering products from us. We will be contacting you within 1 business day by phone to get your credit card information.
Below is a record of your pottery order. Again thank you for using our store!
Sincerely,
Management
P.S. Make sure to read below about the web design company we use, Web DeZion.
They do a tremendous job for us and are very helpful.
';
// Variable that contains the form field submissions. I want to
// either have the if else condition loops insert the variable values
// here or as it's own variable. I will call it $p1all
$info = "--------------------------------------------------------------------------
Order Information:
--------------------------------------------------------------------------
Name: $First_Name $Last_Name
Address: $Address
City: $City
State: $State
Zip: $Zip
Phone: $Phone
Alt. Phone: $Alt_Phone
Work Phone: $Work_Phone
Email: $Email Confirm: $another_email
Comments: $Comments
$bps
--------------------------------------------------------------------------";
$tag ='
Design, PHP Coding, & Web Hosting By [url]http://www.WebDeZion.com[/url]
';
$FN = "$First_Name";
// variables over start processing //
mail( "$to", "$subject", "$messagetosub $info $tag $printp1" , "$headers");
IN the above code I have 2 places that might work...
$info = "--------------------------------------------------------------------------
Order Information:
--------------------------------------------------------------------------
Name: $First_Name $Last_Name
Address: $Address
City: $City
State: $State
Zip: $Zip
Phone: $Phone
Alt. Phone: $Alt_Phone
Work Phone: $Work_Phone
Email: $Email Confirm: $another_email
Comments: $Comments
$bps
// -- Insert $p1all here -- //
$p1all
--------------------------------------------------------------------------";
or
// OR.. Simply Insert $p1all here. I wanted one variable to make
// it simple
mail( "$to", "$subject", "$messagetosub $info $p1all $tag $printp1" , "$headers");
What I am trying to do is get it to where only the variables are printed that had been chosen. Lets say p1 and p3 was ordered. I do not want to echo p2, p4, p5, etc. plus all their product options, which was what I was trying to figure out at first by trying to put those if else conditional in there.