Forum Moderators: coopster

Message Too Old, No Replies

Confused about passing information between pages

         

tunnelvision

7:13 pm on Sep 24, 2004 (gmt 0)

10+ Year Member



Alright,

I fairly new to PHP and a little confused. Heres my problem:
I want to beable to have multiple pages on one page for example all the information will be stored on general.php and when u click the link general.php?subject=about it shows that table of information. If you get me ;) How is this done?

Cheers
<!--tv

paybacksa

7:24 pm on Sep 24, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



The big change from HTML is that PHP enables you to have "variables" in memory which contain information. Once you have such variables available to your page code, you can write PHP code to check them and make decisions based on their contents.

Check a reference book or website for passing information between pages and it should discuss POST and GET variables, $_GET and $_POST (used to be HTTP_POST_ARRAY) and that sort of stuff. Do the examples and learn how to pass info between successive pages of your site (there are many ways, with reasons for use of each).

Then all you need to know is that query strings on the URL are actually in the POST and GET variable arrays in memmory when the page is called. So if the user calls http:www.mysite.com/index.php?subject=wijitts you will be able to read a variable from memory whose value will be "wijjits", and send the correct content.

See [us4.php.net...]

tunnelvision

8:12 pm on Sep 24, 2004 (gmt 0)

10+ Year Member



Thanks very much for the reply it helped me alot.