You are here: carrying over variables from a form to multiple pages... « PHP Programming Language « IT news, forums, messages
carrying over variables from a form to multiple pages...

Posted by Kurrent on 07/05/07 03:17

I have some data from text fields that are being passed over through a
form that I am displaying with the $_POST superglobal. Once i have
echo'd out this data onto the next page, i'd like to continue to use
it on the next page. I haven't figured out how to do this properly
just yet, but I'm guessing it has something to do with sessions. I
have MANY variables being passed (over 100) and I'm hoping i don't
have to register each one of these manually with $_SESSION[].

example.

//first page (index.html)

<form action="form.php" method="post">
<select name="color"><option value="blue">blue</option><option
value="red">red</option>
<input name="submit" type="submit">

//new page (form.php)
<?php
echo "Bill's favorite color is {$_POST['color']}";
?>
////

Now say I want to use this $_POST['color'] value on another page that
the form.php takes you to next.....how do i continue to use this value
across multiple pages?

I'm assuming this is a trivial question, but i can't seem to figure it
out! Any help is much appreciated..thanks guys!

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация