miguelc Posted August 18, 2010 Share Posted August 18, 2010 Hey all, I have a php based form that works well - and emails the results of the form via email (managed via a processor.php file). I want to modify the processor.php to post the data to a URL as this example: ######## firstName=John&lastName=Doe&spouseFirstName=Jane&spouseLastName=Doe&homePhone=09808080&workPhone=09809809&cellPhone=098098&email=jdoe@testdomain.com&loanAmount=097798798&loanType=Refinance&propertyType=Single+Family&propertyValue=75000&creditScore=Excellent&postedDate=&URL=http://www.domainname.com/index.xxx ######### What do I need to change in the processor.php file to post to a URL vs Email as it is today? Here's the contents of processor.php file below...willing to throw some money via paypal to get this going... ### PROCESSOR.PHP ######## <?php $where_form_is="http://".$_SERVER['SERVER_NAME'].strrev(strstr(strrev($_SERVER['PHP_SELF']),"/")); mail("miguel@domainname.com","phpFormGenerator - Form submission","Form data: First Name: " . $_POST['field_1'] . " Last Name: " . $_POST['field_2'] . " City: " . $_POST['field_3'] . " State: " . $_POST['field_4'] . " Zip: " . $_POST['field_5'] . " Email: " . $_POST['field_6'] . " Phone: " . $_POST['field_7'] . " Marital Status: " . $_POST['field_8'] . " Homeowner: " . $_POST['field_9'] . " Driver 1: Name: " . $_POST['field_10'] . " Driver 1: Sex: " . $_POST['field_11'] . " Driver 1: Years US Licensing: " . $_POST['field_12'] . " Driver 1: Birthdate: " . $_POST['field_13'] . " Driver 2: Name: " . $_POST['field_14'] . " Driver 2: Birthdate: " . $_POST['field_15'] . " Driver 2: Sex: " . $_POST['field_16'] . " Driver 2: Years US Licensing: " . $_POST['field_17'] . " Vehicle 1: Year: " . $_POST['field_18'] . " Vehicle 1: Make & Model: " . $_POST['field_19'] . " Vehicle 1: ID#: " . $_POST['field_20'] . " Vehicle 1: Annual Mileage: " . $_POST['field_21'] . " Vehicle 1: Used car?: " . $_POST['field_22'] . " Vehicle 1: Used for Business?: " . $_POST['field_23'] . " Vehicle 2: Year: " . $_POST['field_24'] . " Vehicle 2: Make & Model: " . $_POST['field_25'] . " Vehicle 2: ID#: " . $_POST['field_26'] . " Vehicle 2: Annual Milage: " . $_POST['field_27'] . " Vehicle 2: Used Car?: " . $_POST['field_28'] . " Vehicle 2: Used for Business?: " . $_POST['field_29'] . " Vehicle 1: Coverage: " . $_POST['field_30'] . " Vehicle 1: Comprehensive Deductible: " . $_POST['field_31'] . " Vehicle 1: Collision Deductible: " . $_POST['field_32'] . " Vehicle 1: Uninsured Motorists: " . $_POST['field_33'] . " Vehicle 1: Rental Car: " . $_POST['field_34'] . " Vehicle 1: Medical and or PIP: " . $_POST['field_35'] . " Vehicle 2: Liability Limits: " . $_POST['field_36'] . " Vehicle 2: Comprehensive Deductible: " . $_POST['field_37'] . " Vehicle 2: Collision Deductible: " . $_POST['field_38'] . " Vehicle 2: Uninsured Motorists: " . $_POST['field_39'] . " Vehicle 2: Rental Car: " . $_POST['field_40'] . " Vehicle 2: Medical and or PIP: " . $_POST['field_41'] . " powered by phpFormGenerator. "); include("confirm.html"); ?> ### PROCESSOR.PHP ######## Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted August 19, 2010 Share Posted August 19, 2010 Is there a particular reason you need to do it this way? Most browsers limit the number of characters that can be used in a GET query string, so you'd be better off using the POST method. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.