Wrox Programmer Forums
Beginning PHP Beginning-level PHP discussions. More advanced coders should post to the Pro PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning PHP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old September 29th, 2007, 02:11 PM
Authorized User
Join Date: Sep 2007
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default PHP?something=bla

you know when the URL for a website is like "http://www.something.com/somethingelse/page.php?tab=1"?

then, when you click a link, it changes to "http://www.something.com/somethingelse/page.php?tab=2"
and the whole page changes, and only the "page.php?tab=1" changes?

how do you do this?
Visit my website at GladiatorStudios.com!
Old October 5th, 2007, 02:58 AM
Registered User
Join Date: Jan 2005
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to cyber_kaley


Old October 5th, 2007, 08:24 AM
Authorized User
Join Date: Mar 2005
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to cyber_kaley20 Send a message via AIM to cyber_kaley20 Send a message via Yahoo to cyber_kaley20

<a href="page.php?tab=1">Home</a>
<a herf="page.php?tab=2">About us</a>

the tab its a variable, the value of the tab its 1
if you click the others links its change to other value 2

there have only one file its page.php

if the tab equal to 1 will display the home page

else equal to 2 display the about us page

if($_GET['tab'] == '1') {

echo'Home Page Display';

}ifelse($_GET['tab'] == '2') {

echo 'About Us Display';



Similar Threads
Thread Thread Starter Forum Replies Last Post
Error 1004 - Cannot Access file "bla-bla-bla" joebob_houston Beginning VB 6 3 April 3rd, 2007 05:15 PM
Beg. PHP 5 > Ch. 11 - fetch_field.php crater BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 0 January 2nd, 2007 12:20 PM
PHP Warning: PHP Startup: Unable to load dynamic l surendran Beginning PHP 1 May 29th, 2006 08:49 AM
begin php & mysql - chapter 12, user_form.php jon_stubber Beginning PHP 1 March 9th, 2006 10:57 AM
Error: movie.php & commit.php on p182-186, ch6 willburke BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 0 October 12th, 2004 02:48 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.