Plazman65 Posted March 6, 2006 Share Posted March 6, 2006 Hi all, I was trying to clear this up myself but I think I went and confused myself further. after taking a look at my website as a whole, I realized I dont want to enter the information from the registration form into the database until the payment is processed.So what I was thinking is you would go to the choose membership type, (then that info goes to the registration page)-> to the registration page( then all that info, username, etc) goes to the payment page, (where if the payment processes successfully THEN everything is put in)So after hours and hours of looking stuff up in books and online, I know it has something to do with session variables, then one site refers to form variables which confused me.Ive tried this and some other things without success,heres a examplethe first page<form name="frm_name" id="frm_name" method="get" action="test_form.php"><p>First Name:<input name="firstName" type="text" id="firstName" /></p><p>Last Name: <input name="lastName" type="text" id="lastName" /></p><p><input type="submit" name="Submit" value="Submit" /></p>the second page<p>Thank you,<?php echo $_GET['firstName']; ?> <?php echo $_GET['lastName']; ?></p> I did check and sessions are started on both, If someone maybe could point me in the right direction that would be wonderful. Im using dw,mysql with php,Thanks, Michelle Quote Link to comment https://forums.phpfreaks.com/topic/4180-passing-form-data-to-the-next-form/ Share on other sites More sharing options...
SieRobin Posted March 6, 2006 Share Posted March 6, 2006 Ok this is what I'd do.. I wouldn't GET the information I'd POST it. So in the method change it to post, then change the $_GET to $_POST. As for anything else, why put two different PHP begin and end tags for each echo? Just use one.[code]<?phpif (isset($_POST['submit'])) {$fname=$_POST['firstName'];$lname=$_POST['firstName'];print "$fname $lname";}?>[/code]You don't really need a session to start since this is only the registration, the session would start when they go to log in. Let me know if this helps. Quote Link to comment https://forums.phpfreaks.com/topic/4180-passing-form-data-to-the-next-form/#findComment-14506 Share on other sites More sharing options...
Plazman65 Posted March 6, 2006 Author Share Posted March 6, 2006 [!--quoteo(post=351944:date=Mar 5 2006, 05:02 PM:name=Christopher Robin)--][div class=\'quotetop\']QUOTE(Christopher Robin @ Mar 5 2006, 05:02 PM) [snapback]351944[/snapback][/div][div class=\'quotemain\'][!--quotec--]Ok this is what I'd do.. I wouldn't GET the information I'd POST it. So in the method change it to post, then change the $_GET to $_POST. As for anything else, why put two different PHP begin and end tags for each echo? Just use one.[code]<?phpif (isset($_POST['submit'])) {$fname=$_POST['firstName'];$lname=$_POST['firstName'];print "$fname $lname";}?>[/code]You don't really need a session to start since this is only the registration, the session would start when they go to log in. Let me know if this helps.[/quote]I dont believe it, IT WORKS wooohooo, thanks so much! Quote Link to comment https://forums.phpfreaks.com/topic/4180-passing-form-data-to-the-next-form/#findComment-14513 Share on other sites More sharing options...
Plazman65 Posted March 6, 2006 Author Share Posted March 6, 2006 [!--quoteo(post=351951:date=Mar 5 2006, 05:22 PM:name=plazman65)--][div class=\'quotetop\']QUOTE(plazman65 @ Mar 5 2006, 05:22 PM) [snapback]351951[/snapback][/div][div class=\'quotemain\'][!--quotec--]I dont believe it, IT WORKS wooohooo, thanks so much![/quote]OK so here's where I amI have gone through the choose membership type (I passed that via url), that transfers to the registration page (got all the information from there with the help earlier) I transfered it to the proccess payment page, So now I need to transfer the sum of all that to the confirmation page and then insert into database.I know how to insert it all into the database but Im unsure how to pull it all from the process payment page, for some reason I was thinking if I could just do this again on the payment page<?phpif (isset($_POST['submit'])) {$fname=$_POST['firstName'];$lname=$_POST['firstName'];print "$fname $lname";}?>but it doesnt work, so I was thinking it has something to do with GET? Something like,<?php$username=$GET_['username'];print "$username";?>any ideas? Im so close to having this part finished I can taste it and its driving me nuts. Thanks, Michelle Quote Link to comment https://forums.phpfreaks.com/topic/4180-passing-form-data-to-the-next-form/#findComment-14560 Share on other sites More sharing options...
Plazman65 Posted March 6, 2006 Author Share Posted March 6, 2006 [!--quoteo(post=351951:date=Mar 5 2006, 05:22 PM:name=plazman65)--][div class=\'quotetop\']QUOTE(plazman65 @ Mar 5 2006, 05:22 PM) [snapback]351951[/snapback][/div][div class=\'quotemain\'][!--quotec--]I dont believe it, IT WORKS wooohooo, thanks so much![/quote]nevermind Im a dork I got it. whew Thanks, Michelle Quote Link to comment https://forums.phpfreaks.com/topic/4180-passing-form-data-to-the-next-form/#findComment-14564 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.