Warning: Undefined array key "HTTP_ACCEPT_LANGUAGE" in /var/www/minitokyo/www/includes/common.inc.php on line 360 PHP Help - Minitokyo

page 1 of 1 3 total items

Would anyone know how to make one of your pages/link to be like this:
Instead of having a page mysite.com/credits.php, I want it to mysite.com/index.php?credits

I'm not really sure what it's called, but I hope you know what I am talking about. I'd appreciate all the help! :sweat:
Thank you!

Signature Image
+ Latest Work.:A Dying Friend

DimensionZero

Now, Diabolical!

well.. i'm not a PHP coder (i'm a ColdFusion coder) but, the logic is the same...

well.. up there in the querystring (?something) you'll pass a value that will identify the page you wanna load.... so, you'll have to put some IFs (i recommend you to use SWITCH/CASE) and then include the page... like

(this is not the correct php syntax, just logical stuff)

SWITCH 'value':
CASE value = 'credits' {include credits.php};
CASE value = 'news' {include news.php};

or you may use IF/ELSE

IF (value = 'credits') then (include credits.php)
ELSE IF (value = 'news') then (include news.php)
ELSE IF (value = 'archive') then (include archive.php)

got the idea?

This signature violates the signature guidelines, thus it has been removed

if(isset($_GET['parameter'])){
$lawl=$_GET['parameter'].'.php';
@include('dir/'.$lawl); or echo a meta HTML redirector if u prefer
}

a link would be: <a href="index.php?parameter=credits">

I hope it helps. Although I don't know how old this thread is xD

page 1 of 1 3 total items

Back to Computers & Internet | Active Threads | Forum Index

Only members can post replies, please register.

Warning: Undefined array key "cookienotice" in /var/www/minitokyo/www/html2/footer.html on line 73
This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read more.