PDA

View Full Version : PHP Question : index.php?id=


Mess
04-16-2006, 10:45 PM
Hey, I'm new here !!!
Can someone help me with that please ???!?!?!!!!
I linked a link to "index.php?id=sitename" and what now... the site that should appear is done too.
But when I click that link nothing happens.

PLEASE HELP ME !!!
here is the site : http://www.project-studios.com/urban-block/theshadybase/
and the link is called BIOGRAPHY ... only that one !!!

goughy000
04-16-2006, 10:48 PM
Code?...

Mess
04-16-2006, 10:49 PM
code what ???

goughy000
04-16-2006, 10:50 PM
show us some of your code so we can give you pointers to whats wrong :confused:

Coders on here won't write the whole thing for you.

Mess
04-16-2006, 10:52 PM
show us some of your code so we can give you pointers to whats wrong :confused:

Coders on here won't write the whole thing for you.


I can but I gave the link to the site ... the source code is there and the page that should appear is biography.php

goughy000
04-16-2006, 10:56 PM
The PHP code, not html output

Mess
04-16-2006, 10:59 PM
yo, I'm pretty new to php and I never did that index.php?id= and I have no idea what you mean ...
don't you have a kinda tutorial for that ?

thx

goughy000
04-16-2006, 11:02 PM
page.php?id=123


<?php
echo $_GET['id'];
?>


outputs 123

page.php?id=biography


<?php
include_once($_GET['id'] . ".php");
?>

However its a security issue doing it that way.

http://php.net/include_once

Thats just to get you started, you should be able to build on that :cool:

Mess
04-16-2006, 11:08 PM
^ I should insert those codes in index.php only right ?

Mess
04-16-2006, 11:20 PM
damn, I don't get that ...
where do I have to insert that and what do I have to chenge threre ?

php is kinda mad hard for me ...

FaR_ElitE
04-17-2006, 01:03 AM
Go to your local library, and get a php for beginners book ;)

I recommend an oriely one << not sure if thats how u spell it