Jump to content

Recommended Posts

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 example
the 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
Link to comment
https://forums.phpfreaks.com/topic/4180-passing-form-data-to-the-next-form/
Share on other sites

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]<?php
if (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.
[!--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]<?php
if (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!
[!--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 am
I 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
<?php
if (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
[!--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
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.