Plazman65 Posted March 5, 2006 Share Posted March 5, 2006 Hi all, I created a registration, login page etc but then I realized I dont want to insert the data until after the payment is processed.So I was trying to create the following,Pick membership type- that gets pulled over to the registration page (I did that via url) and then I would like to pass all the details in the registration page (name,username,etc) over to the payment processing page,I was trying <?php $username=$_POST['username'] $firstname=$_POST['firstname']?>but it doesnt seem to be working. Anybody have any other ideas, Im new and trying to learn php, and dw at the same time. Thanks, Michelele Quote Link to comment Share on other sites More sharing options...
Hooker Posted March 5, 2006 Share Posted March 5, 2006 Try:[code]<?php$username=$_POST['username'];$firstname=$_POST['firstname'];?>[/code]for that part atleast Quote Link to comment Share on other sites More sharing options...
Plazman65 Posted March 5, 2006 Author Share Posted March 5, 2006 [!--quoteo(post=351775:date=Mar 4 2006, 11:38 PM:name=Hooker)--][div class=\'quotetop\']QUOTE(Hooker @ Mar 4 2006, 11:38 PM) [snapback]351775[/snapback][/div][div class=\'quotemain\'][!--quotec--]Try:[code]<?php$username=$_POST['username'];$firstname=$_POST['firstname'];?>[/code]for that part atleast[/quote]thanks, those breaks get me everytime, I dont know why I cant remember those,So if I understand it right- the above is creating a session for the entries someone puts in a form right? then in theory I could list their selections on the next page by doing something like,<?php echo "Your almost done". $_SESSION['firstname'] ."! br /><br />" ?>;I appreciate the help, Im want to make sure Im understanding the process. Thanks, Michelle Quote Link to comment Share on other sites More sharing options...
ale_jrb Posted March 5, 2006 Share Posted March 5, 2006 No - its not creating a session (I don't think).All I see it doing is retreiving the values from a form - you'd have to register a session to use sessions... Quote Link to comment Share on other sites More sharing options...
JustinK101 Posted March 20, 2006 Share Posted March 20, 2006 [b]To make a session, which you can use the variables on various other pages follow these steps:[/b]1.) At the very top of each page you want to either set or have the session variables availabe put the following code. Basically just put this at the top of all pages to be safe.[code]<? session_start();?><html><body>...[/code]2.) To set variables in a session:[code]<? session_register("session_username"); session_register("session_password"); $session_username = $username; $session_password = $password;?>[/code]3.) To use/get variables:[code]<? echo $_SESSION['session_username']; echo $_SESSION['session_password'];?>[/code]4.) To delete all stored variables in the session:[code]<? session_unset();?>[/code][b] HOPE THIS HELPS SOME PEOPLE...[/b] Quote Link to comment Share on other sites More sharing options...
skatermike21988 Posted March 20, 2006 Share Posted March 20, 2006 [!--quoteo(post=351836:date=Mar 5 2006, 11:40 AM:name=plazman65)--][div class=\'quotetop\']QUOTE(plazman65 @ Mar 5 2006, 11:40 AM) [snapback]351836[/snapback][/div][div class=\'quotemain\'][!--quotec--]thanks, those breaks get me everytime, I dont know why I cant remember those,So if I understand it right- the above is creating a session for the entries someone puts in a form right? then in theory I could list their selections on the next page by doing something like,<?php echo "Your almost done". $_SESSION['firstname'] ."! br /><br />" ?>;I appreciate the help, Im want to make sure Im understanding the process. Thanks, Michelle[/quote]You Can Also try[code]<?php$username=$_POST['username'];$firstname=$_POST['firstname'];//then have an hidden input here plus the rest of your formecho "<form action='continue.php' method='POST'><input type='hidden' name='username' value='$username'><input type='hidden' name='firstname value='$firstname'>//etc then your form below:Please Select A Payment Method:<input type='radio' name='paypal' value='paypal'>Paypal//other payments etc?>[/code]Then just keep the[code]$username=$_POST['username'];$firstname=$_POST['firstname'];[/code]along with the hidden inputs on each page.doing so keeps the information going on and on through each pageThis Worked For Me At Least 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.