|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hello everyone, thanks for reading my question. I am fairly new to PHP. I've built several mail forms and basic dummy apps just for testing purposes, so I am by no means a pro. I recently ran into a situation where I created:
1st Form page which collects info and echos to next page for verification 2nd Verify page opens, displaying all info with submit button What I am trying to do is take that echoed info and then, once previewed by the user, they can choose to submit it if ok. But I am confused how this will work/or how I can make it work because my knowledge at this point doesn't permit a way to take the info being varified, turn it in to variables, and then allow it to send via mail() (I already have this working, it's just passsing the variables from the varification page I having trouble with), opening a new .php varified "Ok" page. Or if you know a better way, I am totally open for any suggestions, I just want to learn PHP! If you don't understand my question, which I know may be very possible, you can email me at contact@southeastwebsites.com . Any info or help is highly apprechiated! Thanks! Here is the code from myverify page: <?php $numofpages = $HTTP_POST_VARS['numofpages']; $numofart = $HTTP_POST_VARS['numofart']; $numofforms = $HTTP_POST_VARS['numofforms']; $generalsitedesign = $HTTP_POST_VARS['generalsitedesign']; $anyotherinfo = $HTTP_POST_VARS['anyotherinfo']; $firstname = $HTTP_POST_VARS['firstname']; $lastname = $HTTP_POST_VARS['lastname']; $emailname = $_POST['emailname']; $phonename = $HTTP_POST_VARS['phonename']; $calltime = $HTTP_POST_VARS['calltime']; $lastinfo = $HTTP_POST_VARS['lastinfo']; echo '<p>Is this quote request correct?</p>'; echo $numofpages.' Pages:<br />'; echo $numofart.' Images:<br />'; echo $numofforms.' Forms:<br />'; echo $generalsitedesign.' General design<br />'; echo "Any other info about site: $anyotherinfo<br />"; echo '<p>Is your contact info correct?:</p>'; echo "Name: $firstname $lastname<br />"; echo "Email: $emailname<br />"; echo "Phone: $phonename<br />"; echo "Best time to call: $calltime<br />"; echo "Additional info: $lastinfo<br />"; $mail_body = "\nFirst Name: ".$firstname; $mail_body .= "\nLast Name: ".$lastname; $mail_body .= "\nEmail: ".$emailname; $mail_body .= "\nPhone#: ".$phonename; $mail_body .= "\nBest Time to Call: ".$calltime; $mail_body .= "\nMore Info: ".$lastinfo; $mail_body .= "\nNumber of Pages: ".$numofpages; $mail_body .= "\nNumber of Art: ".$numofart; $mail_body .= "\nNumber of Forms: ".$numofforms; $mail_body .= "\nGeneral Site Design: ".$generalsitedesign; $mail_body .= "\nAny Other Info Re: Site: ".$anyotherinfo; $mail_to = "drumshop@drummersgalaxy.com"; $mail_subject = "SEW Quote Request Approval"; mail($mail_to, $mail_subject, $mail_body,"From: ".$_POST['emailname']); echo "<center><p>Thank you. We'll be contacting you shortly.</center></p>"; ?> |
|
#2
|
||||
|
||||
|
Do you have some code already? It would be nice if you posted it. It's not to hard to do such a thing, though. But please show some code.
__________________
Work to live, don't live to work |
|
#3
|
|||
|
|||
|
PHP code
Here it is.
Quote:
|
|
#4
|
||||
|
||||
|
Make some hidden input fields with the values from your variables. Place a submit button. You can set the action of the form to php_self, check with an if-statement if the button is pressed and mail / save the data.
And I couldn't help noticing that you use $HTTP_POST_VARS everywhere, except for the email of the user. There will be no problem with it, but try to make your code using one method. You make it more clearer for yourself. Hope this would help you. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > PHP Development > PHP question? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|