TeamPhotoshop
Reviews, updates and in depth guides to your favourite mobile games - AppGamer.com
Forum Home Latest Posts Search Help Subscribe

Php Include, I forgot it

Page: 1 Reply
Aug 15th 2004#158509 Report
Member since: Jun 22nd 2002
Posts: 184
I haven't done it for a while and I tried searching but they only the one where it includes the .html or .php or whatever directly.

I'm looking for the one I use to use, where it includes the variable $page or whatever you'd like the variable to be. Then you define the variable through your link.

www.blah.com/index.php?page=contact

would this be the same as the regular include? except replace contact.html with $page

anyhow i tried that, maybe I left a space somewhere.

Thanks
Reply with Quote Reply
Aug 15th 2004#158510 Report
Member since: Mar 20th 2001
Posts: 3367
www.blah.com/index.php?page=contact

[php]
switch($page){
case "home" : include("home.index.inc.php"); break;
case "services" : include("services.index.inc.php"); break;
case "about" : include("about.index.inc.php"); break;
case "contact" : include("contacts.index.inc.php"); break;
}

[/php]
Reply with Quote Reply
Aug 15th 2004#158523 Report
Member since: Apr 20th 2002
Posts: 3000
'tis include, singular.
Reply with Quote Reply
Aug 15th 2004#158525 Report
Member since: Mar 20th 2001
Posts: 3367
Opss, thanks for pointing out.
Reply with Quote Reply
Aug 15th 2004#158561 Report
Member since: Jun 22nd 2002
Posts: 184
there weee goo, thanks man
Reply with Quote Reply
Page: 1 Back to top
Please login or register above to post in this forum