Log inUsernamePassword
Log me on automatically each visit    
Register
Register
Log in to check your private messages
Log in to check your private messages
CJ Webmaster Forums Forum Index » PHP & MySQL

Post new topic   Reply to topic
Help needed! (solved)
View previous topic :: View next topic  
Author Message
MaticooL
New User


Joined: 12 Jan 2006
Posts: 2

PostPosted: Thu Jan 12, 2006 2:27 pm    Post subject: Help needed! (solved) Reply with quote

Hello!
I was searching all over the internet but nowhere found the exact answer for my question, I hope I'll get better help on this website. Well the question is pretty simple: How do I add more than one variable to querystring? I mean that I know how to make stuff like that:

www.example.com/index.php?emulator=GBA

but the thing I dont know is how to add second variable that will look like this:

www.example.com/index.php?emulator=GBA&rom=Mario

Tell me please what should I add to this code to make it happen:

<?php
include('header.inc');

$page = $_GET['page'];

switch ($page) {
case 'GBA':
include('gba.inc');
break;

default:
include('main.inc');
break;
}

include('footer.inc');

?>
Back to top
View user's profile Send private message
darkcarnival
CJ-Design.com Admin



Joined: 10 Jul 2003
Posts: 1349
Location: Michigan

PostPosted: Thu Jan 12, 2006 3:53 pm    Post subject: Reply with quote

well when you do a link like that your setting up a variable. so simply just call it like so:

Code:
<?php
include('header.inc');

$page = $_GET['page'];
$rom = $_GET['rom'];

switch ($page) {
case 'GBA':
include('gba.inc');
break;

default:
include('main.inc');
break;
}

include('footer.inc');

?>


also for a heads-up if you intend to use .inc for a filename you must add .php to make it secure, otherwise anyone can open the file.

example: header.inc.php
_________________
Admin of CJ-Design Forum
watch out spammers, I'm watching you! Twisted Evil

Elite Bulletin Board v0.5 try it out today!
http://www.elite-board.z42.us/

version 0.9 coming soon!
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
MaticooL
New User


Joined: 12 Jan 2006
Posts: 2

PostPosted: Thu Jan 12, 2006 5:36 pm    Post subject: Reply with quote

Ok, thanks, will do! Wink
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    CJ Webmaster Forums Forum Index » PHP & MySQL All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2001, 2002 phpBB Group
iCGstation v1.0 Template By Ray © 2003, 2004 iOptional, Mods by CJ Website Design