i need help

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
pure-krypton
Forum Newbie
Posts: 1
Joined: Fri Mar 12, 2004 5:14 pm
Contact:

i need help

Post by pure-krypton »

i know nothing about php :( and would like some help. this is what i want like to know how to do:

cars.php?display=nissan
cars.php?display=toyota
cars.php?display=honda

each link to display a different page. could someone please help me?
User avatar
andre_c
Forum Contributor
Posts: 412
Joined: Sun Feb 29, 2004 6:49 pm
Location: Salt Lake City, Utah

Post by andre_c »

Try this:

Code: Select all

<?
include $_GET['display'] . '.php';
?>
if the pages are named nissan.php, toyota.php, and honda.php
Last edited by andre_c on Fri Mar 12, 2004 5:18 pm, edited 2 times in total.
Illusionist
Forum Regular
Posts: 903
Joined: Mon Jan 12, 2004 9:32 pm

Post by Illusionist »

yeah, first thing: read some tutorials. learn a little. And your question is cryptic, but i think you may be wanting to do something like:

Code: Select all

echo $_GET['display'];
add that to cars.php and then when you go to something like cars.php?display=nissan, it will echo out nissan
Post Reply