This is a discussion on "passing data accross multiple pages" within the PHP Forum section. This forum, and the thread "passing data accross multiple pages are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
passing data accross multiple pages
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
passing data accross multiple pages
Hi, Im currently building a directory type site. I have a registration procedure covering about 3 pages. What is the best way to pass data to the final page to be written to the database?
ideas currently are: A cookie, although peolple may not trust cookies from an unknown site, Write to the database at the start of each page, problems may occur if multiple people are registering at the same time, or to create a temp file on the server for each new registration, no idea how to do this as yet.. Or I can pass the data through the pages in hidden text inputs.. I'm a bit out of my depth on this, but am doing it both as a commercial site, and to learn more about database driven websites.. any help, ideas or info on potential traps appreciated! Nate. Last edited by nate2099; Jul 8th, 2007 at 11:45. |
|
|
|
||||
|
Re: passing data accross multiple pages
Probubly a session/cookie but i dont know how to do them yet!
|
|
||||
|
Re: passing data accross multiple pages
If you're using PHP then using a session is your best bet.
It's quite easy to use a session: At the top of each page that needs to access the data call the session_start function and use the following syntax to create and access variables in the session: first page:
Hope that works and hope you can understand that... Check out this page on php.net for more info on using sessions.
Last Blog Entry: 10 Reasons Why My Laptop Is Better Than Your Girlfriend (Dec 15th, 2007)
|
![]() |
| Tags |
| passing data, php |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| 405 error passing data from html to php | nate2099 | Starting Out | 2 | Apr 9th, 2007 22:18 |
| passing search data to d/b via a hyperlink and without input fields | Colm Osiris | Databases | 5 | May 23rd, 2006 11:38 |
| Passing session data | tomd1985 | PHP Forum | 1 | Mar 6th, 2006 18:13 |
| Passing Data ... | TheShadow | Classic ASP | 2 | May 30th, 2005 09:31 |
| Passing form variable between pages | rhoov | Classic ASP | 8 | Dec 16th, 2003 14:59 |