Forum Moderators: coopster

Message Too Old, No Replies

After I store vaiables in hidden, can't echo

After I store vaiables in hidden tags in my form I can't display the variab

         

amdorsey

9:49 pm on Feb 18, 2004 (gmt 0)

10+ Year Member



I have 4 pages with 4 forms (1.php, 2.php, 3.php, done.php)

the user selects a value, I store it in a hidden tag, the user hits submit and goes to the next form. I can see the values stored in the URL but I cannot get them to display for the user.

I am using the simple echo, <?php echo $var1?>

Can anyone help me?

I use Dreamweaver MX. I have xhtml compliant checked. Does being XHTML compliant screw up PHP?

Timotheos

10:21 pm on Feb 18, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi amdorsey,

My guess is you need to use the $_GET superglobal [php.net].

So do this <?php echo $_GET['var1']?>

webadept

7:58 am on Feb 19, 2004 (gmt 0)

10+ Year Member



I agree with Timotheos here, you are using an outdate technique, which will probably not work on any ISP worth their monthly rate. I have a funtion which I use to do this (or did before I started using Sessions instead).

function get_input()
{

$in = $_GET + $_POST;

return $in;

} // end function get_input();

You use this at the top of your program by coding:

$in = get_input();

now you can use the hidden values coming in by calling the array value of $in using the same name.

$useremail = $in['email'];
$useraddress = $in['address'];
$userphone = $in['phone'];

and so on, just to give an example.

Glenn Hefley