openhandmedia Posted October 9, 2009 Share Posted October 9, 2009 Hello all! I am a newbie, yes, and am trying to learn as quickly as I can! I am building a site for a non-profit that needs to collect information for sponsorships fields including: donation level, company information, other sponsorship opportunities, etc. The full form can be see here: http://www.campgolfchallenge.org/register.html Currently when the form is filled out it sends an email to the visitor and someone collecting the information. What I need to do is have the form ALSO post the filled out information to another page ,"register-submit.php" for instance, totaling the amount of money selected from the form but still emailing the information to the visitor. My goal is to incorporate Google Donate so that they can see after submitting the form how much they need to enter into the donate field. I hope this isn't too confusing and someone can help! I am also attaching the php files sendmail-register.php, register-submit.php [attachment deleted by admin] Link to comment https://forums.phpfreaks.com/topic/177033-need-php-form-to-send-an-email-on-submit-and-go-to-a-confirmation-type-page/ Share on other sites More sharing options...
johnsmith153 Posted October 9, 2009 Share Posted October 9, 2009 Only a human can POST a page (cUrl is possible but I wouldn't). Php can't POST to another page. The best bet is to store in a PHP session, then recall on any other page you want. (look into PHP sessions - very simple). You could use $_GET which is exactly the same as POST (just type GET instead of POST) - and this pulls what is in the address bar rather than what sent in a form. Php could then do a header redirect to www.yoursite.com/page.php?a=Dave&b=100 By pulling $_GET['a'] and $_GET['b'] you can say: Thanks Dave, you paid $100 or something. header redirect is simple php code: header ("Location: http://www.sitename.com/page.php?a=123"); Link to comment https://forums.phpfreaks.com/topic/177033-need-php-form-to-send-an-email-on-submit-and-go-to-a-confirmation-type-page/#findComment-933479 Share on other sites More sharing options...
cunoodle2 Posted October 9, 2009 Share Posted October 9, 2009 I disagree. Curl can post just as well as a human (except captcha). Give that a shot. It should do everything that you need it to. Link to comment https://forums.phpfreaks.com/topic/177033-need-php-form-to-send-an-email-on-submit-and-go-to-a-confirmation-type-page/#findComment-933512 Share on other sites More sharing options...
johnsmith153 Posted October 9, 2009 Share Posted October 9, 2009 I wasn't saying cURL can't post as well as a human, I was saying I wouldn't use it for this. In this case it would just be best to store values in a session, or even merge the 2 scripts into one. cURL for this just doesn't seem the best method - and also slightly more difficult for someone new to php. I would look into PHP sessions, not cURL. Link to comment https://forums.phpfreaks.com/topic/177033-need-php-form-to-send-an-email-on-submit-and-go-to-a-confirmation-type-page/#findComment-933681 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.