473,396 Members | 1,975 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

passing over variables from a form to multiple pages

1
I have some data from text fields that are being passed over through a
form that I am displaying with the $_POST. Once i have
echo'd out this data onto the next page, i'd like to continue to use
it on the next page without submitting it through a form action. I haven't figured out how to do this properly
just yet
example.

Expand|Select|Wrap|Line Numbers
  1. //first page (index.html)
  2.  
  3. <form action="check.php" method="post">
  4. <select name="rooms">
  5. <option value="1">1</option>
  6. </select>
  7. <select name="adult">
  8. <option value="1">1</option>
  9. </select>
  10. <input name="submit" type="submit">
  11. </form>
  12.  
  13. //new page (check.php)
  14. <?php
  15. echo "You're booking Details are: {$_POST['rooms']}";
  16. echo " {$_POST['adult']}";
  17. ?>
  18. ////
Now I want to use this $_POST['rooms'] and $_POST['adult'] value on "register page" that when i move to the register.php, i will be able to see those values and continue to use this value
across multiple pages?

Any help is much appreciated..thanks guys!
Apr 10 '15 #1
1 2785
RonB
589 Expert Mod 512MB
Store the data in session vars.

Basic PHP Sessions
http://www.w3schools.com/php/php_sessions.asp
Apr 10 '15 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Matthew Robinson | last post by:
i read a tutorial the other day on passing variables between php pages using a html form and setting the action to the php page to parse, can anybody see anything wrong with the code below? the...
5
by: julian maisano | last post by:
As you'll see, I'm a beginner php guy... What i'm trying to achieve is: 1) List in AllProducts.php a set of products which are stored in a MySql table. Each product has a picture. Each picture...
1
by: David E | last post by:
Hello I having trouble with this action cause I want the user to be able to use the back button and the submitted data should be still in their form. So I the user send invalid data he can back...
3
by: ben | last post by:
Hi guyz, I am developing a website using php.This website involves dealing with forms which span over multiple pages. I want data obtained from 1 form to be available after 3-4 pages. This...
1
by: Eric | last post by:
Hello, I am trying to come up with the best way to pass large amounts of data from page to page, namely a data table. The user needs to enter data into a form in one page and confirm it on...
7
by: Khai | last post by:
First off, yes, I understand the crapload of tutorials out there, (well, rather, I understand there /are/ a crapload of tutorials out there), the problem is my comprehension. I'm trying to pass...
4
by: Kurrent | last post by:
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...
4
by: John H | last post by:
Hi, I'm busy fiddling with sessions under PHP5, and very quickly learned what I would have found out even sooner in the PHP manual - declaring your session variable on page1.php makes it...
6
by: coool | last post by:
Hi :) anyone knows how can I send variables from a php page to a form - i need to fill the form with these variables ? maybe using (the process of passing variables to other pages - through...
1
BezerkRogue
by: BezerkRogue | last post by:
I have created a page that passes a variables from the start page to a results page that allows operators to edit the data. When I click the submit button, it reruns the page load instruction from...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.