Jump to content


Photo

passing form data to the next form


  • Please log in to reply
4 replies to this topic

#1 Plazman65

Plazman65
  • Members
  • PipPipPip
  • Advanced Member
  • 46 posts

Posted 06 March 2006 - 12:41 AM

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

#2 SieRobin

SieRobin
  • Members
  • PipPipPip
  • Advanced Member
  • 212 posts
  • LocationNew Jersey

Posted 06 March 2006 - 01:02 AM

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.

<?php
if (isset($_POST['submit'])) {

$fname=$_POST['firstName'];
$lname=$_POST['firstName'];

print "$fname $lname";
}
?>

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.

#3 Plazman65

Plazman65
  • Members
  • PipPipPip
  • Advanced Member
  • 46 posts

Posted 06 March 2006 - 01:22 AM

[!--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) View Post[/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.

<?php
if (isset($_POST['submit'])) {

$fname=$_POST['firstName'];
$lname=$_POST['firstName'];

print "$fname $lname";
}
?>

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!

#4 Plazman65

Plazman65
  • Members
  • PipPipPip
  • Advanced Member
  • 46 posts

Posted 06 March 2006 - 05:27 AM

[!--quoteo(post=351951:date=Mar 5 2006, 05:22 PM:name=plazman65)--][div class=\'quotetop\']QUOTE(plazman65 @ Mar 5 2006, 05:22 PM) View Post[/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

#5 Plazman65

Plazman65
  • Members
  • PipPipPip
  • Advanced Member
  • 46 posts

Posted 06 March 2006 - 05:52 AM

[!--quoteo(post=351951:date=Mar 5 2006, 05:22 PM:name=plazman65)--][div class=\'quotetop\']QUOTE(plazman65 @ Mar 5 2006, 05:22 PM) View Post[/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




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users