|
#1
|
|||
|
|||
|
PHP Passing Variables
Hi guys,
Can anyone please help with passing variables to nextpage.php but not displaying them? or provide any ideas on how to store all the variables which a displayed on my first page globally? Also this session thingy how does this work? I think that it works like this but if someone could confirm it that would be great. use a session start on the first page, this will give a unique number and letter combination created by the server something like a4s877dsr8943jc09kkl and throughout the site the user will keep this same identifier session number? What I have upto now is a select dropdown box which retrieves a mysql column called companyname from my table customers. After selecting the company and pressing next my next page has a sql query which selects companyname, companyaddress, telephone, extention, fax, postcode, email, website FROM customers WHERE companyname =form1 from the last page. All these columns are then stored in variables with the column name ie $companyname, $fax etc What I would like to do is have all these variables stored globally so that I do not have to keep querying the database. Any ideas how I would achieve this? Thanks in advance
|
|
#2
|
||||
|
||||
|
When you pass variables using the GET method they show up in the URL, when you pass them using the POST method they don't. Check this out for a better explanation than I can probably write.
![]() http://www.google.ca/search?hl=en&q=...nd+get&spell=1 |
|
#3
|
|||
|
|||
|
Thanks Corey,
I seem to grasp the get and post methods now but I am still struggling with this session thingy. Say I have $fax and $company and a include to a session.php how would I store the value of $fax and $company in the session for later retrieval throughout my other pages which also have the sample include session.php? Kind regards Ian |
|
#4
|
|||
|
|||
|
I think that I have now worked it out with this tutorial
http://www.zend.com/zend/tut/session.php I should be using session_register("$fax"); //etc after I have queried my db Then on all my other pages I should be using session_start(); //I think Thanks for help guys I will get there one day. |
|
#5
|
||||
|
||||
|
Sounds like you're doing pretty well already.
The guys at Zend are great. |
![]() |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Problem with HTML passing variables to AMS | Squirrel22 | AutoPlay Media Studio 5.0 | 12 | 06-16-2005 12:30 AM |
| asp or php passing variables? | ianhull | Developer's Den | 12 | 06-11-2005 04:49 AM |
| Help passing screen variables | swilk | Setup Factory 7.0 Discussion | 2 | 12-06-2004 12:07 PM |
| passing variables to swish/flash | cyberwebwerks | AutoPlay Media Studio 4.0 | 0 | 10-07-2003 07:46 AM |
| INFO: Setting Environment Variables | Support | Setup Factory 6.0 Knowledge Base | 0 | 10-10-2002 01:07 PM |
All times are GMT -6. The time now is 10:51 AM.








Linear Mode

