Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Menu items

Status
Not open for further replies.

shop73

IS-IT--Management
May 13, 2007
48
BA
In web pages I found menu with this links

example.php?category=web
example.php?category=music
example.php?category=game

When I click menu button web (example.php?category=web) it opens this page in part of web page. Next buton (music) opens music page in same place of web page etc...

What's it? How to make this?

Thanks.
 
Its Called PHP. Its a server side language.

What it does is have the contents of the pages or in this case categories stored somewhere like a Database or content files. It reads from those and displays the appropriate information in the page depending on the value of the category variable.

For this to work, you will have to make sure your server supports PHP.



----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Traingamer, can You write one simple example for me?

 
No.

Greg
"Personally, I am always ready to learn, although I do not always like being taught." - Winston Churchill
 
Basically its just checking the variable and reading the appropriate content.

However, you still haven't actually made sure your webserver supports it. You need the PHP parser on the server for it to work.

It wont just work like HTML or Javascript would.

If you don't know whether it supports it or not.
Put this in a file and call it phpinfo.php


Code:
<?PHP
phpinfo();
?>

Then Call it up in a browser. If it shows you a whole bunch of information in a table. Then PHP is installed in your server. If not then it isn't and you can't use the technique.

----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top