Hello,
I recently had an idea for a business selling an informational product that would involve a website with a few links that all lead to an “order form” that when submitted would send an email to my hotmail account.
Soo over the last week I’ve learned dreamweaver, made a home page using html, css with a linked “order now” image. The order now image links to an order form I made again using html, css and spry(i think javascript) tools. At the bottom of the order form there is a place order button.
From what I could gather, my next step was to write a php script that included:
a) the directions (php code) on how to handle all the order form info and
b) contain the html code for the page to be displayed after the order button was pressed.
So I did that best I could figure out.
Then I learned I had to download wamp and set up a local server to host the site so that my php page would work in firefox and i could test it. So i set it all up and copied the site into the C:wamp/www folder. the html page and order form work fine, but when i hit place order, the browser “thinks” for about 10 seconds then spits out a page with about 50 errors that are all orange and grey.
here is an example of the error:
( ! ) Notice: Undefined index: sprytextfield1 in C:\wamp\www\gethiredcode\formprocess.php on line 7
Call Stack
Time Memory Function Location
1 0.0004 687232 {main}( ) …\formprocess.php:0
I’m stuck. What am I doing wrong?
I have a feeling it is the actual php i coded. but since wamp can’t be eliminated as a variable, I would like to ask for opinions here.
Thanks in advance for your help!
HERE IS ALL THE CODE FOR MY PHP PAGE (i followed a youtube video to get this far with it)
<?php $emailSubject = 'crazy php scripting!'; $webMaster = '[email protected]'; $emailField = $_POST['sprytextfield1']; $emailconfirmField = $_POST['spryconfirm1']; $firstnameField = $_POST['sprytextfield2']; $lastnameField = $_POST['sprytextfield3']; $ccnumberField = $_POST['sprytextfield7']; $cctypeField = $_POST['spryselect2']; $ccexpmonthField = $_POST['spryselect3']; $ccexpyearField = $_POST['spryselect4']; $cccsccodeField = $_POST['sprytextfield8']; $shippingstreetField = $_POST['sprytextfield4']; $shippingaptsteFielf = $_POST['aptste']; $shippingcitystatezipField = $_POST['sprytextfield6']; $phonenumberField = $_POST['sprytextfield14']; $sameashomeField = $_POST['sameashome']; $billingaddyField = $_POST['billingaddy']; $billingaptsteField = $_POST['baptste']; $billingcityField = $_POST['billingcity']; $body = <<<EODEmail: $sprytextfield1
Emailr: $spryconfirm1
Firstname: $sprytextfield2
Lastname: $sprytextfield3
CCnumber: $sprytextfield7
CCtype: $spryselect2
CCexpmonth: $spryselect3
CCexpyear: $spryselect4
Cccsccode: $sprytextfield8
Shippingstreet: $sprytextfield4
Shippingaptste: $aptste
Shippingcitystatezip: $sprytextfield6
Phonenumber: $sprytextfield14
Sameashome: $sameashome
Billingaddy: $billingaddy
Billingaptste: $baptste
Billingcity: $billingcity
EOD; $headers = "From: $sprytextfield1\r\n"; $headers .= "Conent-type: text/html\r\n"; $success = mail($webMaster, $emailSubject, $body, $headers); $theResults = <<<EOD Your order cannot be processed
thanks for your order
EOD; echo "$theResults"; ?>