Form processing


#1

I am using a PHP script to process some forms on my website. I’ve run into a problem though, and am hoping someone here can help. I am using this script to send leads to an affiliate. Because of their tracking system, the format of the leads must be very specific.

For each each field, it must be e-mailed as such:

Name = User’s Name
Last Name = User’s last name
Address = User’s Address
etc.

The problem is when I attempt to have the = sign show up in the email. If I have the = next to the text (ie. name or last name) the entire field will not show up at all. An example would be:

[‘address’] = $_VALUES[‘form_address’];

Where if the adress has an = next to it, the form does not appear. Any quick way to make this work?


#2

I think you need to escape the string but I am not sure. You amy also try using literal strings in the area where you are creating the body of the email message
Ex:
$body .= ‘Say something profound heren’;
$body .= 'Name = ’ . $_POST[‘name’] . 'nLast Name = ’ . $_POST[‘lName’] . 'nAddress = '. $_POST[‘addr’];


#3

That’s basically what I’m doing. For some reason, that field won’t appear in the email at all. Everything works so long as an ‘=’ is not included.


#4

Would you mind posting the code specifically for the problem?


#5

What the script does is take the form data from a webpage, take the info and sent it over to 2 seperate affiliates.

This is one of the sources the data is being sent to:

$formsToPost['PCDI']['url'] = 'http://medical-transcription-courses.com/cgi-bin/formintro.cgi'; $formsToPost['PCDI']['values'][''] = 'INTERNET LEADS:'; $formsToPost['PCDI']['values']['Course'] = '= YY'; $formsToPost['PCDI']['values']['Department Code'] = '= E708'; $formsToPost['PCDI']['values']['First Name'] = $_VALUES['first_name']; $formsToPost['PCDI']['values']['Last Name'] = $_VALUES['last_name']; $formsToPost['PCDI']['values']['address'] = $_VALUES['Address =']; $formsToPost['PCDI']['values']['city'] = $_VALUES['City =']; $formsToPost['PCDI']['values']['state'] = $_VALUES['State =']; $formsToPost['PCDI']['values']['zip'] = $_VALUES['Zip Code =']; $formsToPost['PCDI']['values']['email'] = $_VALUES['email']; $formsToPost['PCDI']['values']['phone'] = $_VALUES['individual_area_code'] . $_VALUES['phone_number']; $formsToPost['PCDI']['values']['age'] = ''; $formsToPost['PCDI']['values']['education_level'] = ''; $formsToPost['PCDI']['values']['courses'] = ''; $formsToPost['PCDI']['values']['format'] = ''; $formsToPost['PCDI']['values']['emailoptout'] = ''; $formsToPost['PCDI']['values']['recipient'] = $_VALUES['recipient'];;

As I said, everything works ok, unless I put an “=” in the [‘Example’]