A community project?

All about creating websites!
User avatar
Gogeta70
^_^
^_^
Posts: 3275
Joined: 25 Jun 2005, 16:00
18

Post by Gogeta70 »

Mab, i was thinking something more like the following:

Code: Select all


$pages = array("main", "files", "specs");
$id = $_GET("pid"); // magic quotes are enabled on my server, no need for addslashes()

if(in_array($id, $pages))
{
  include($id . ".php");
} else {
  header("location: index.php");
}

of course, the code will be a bit more complicated, but that gives the main picture. We'll also have a script to generate links based upon that same array.
¯\_(ツ)_/¯ It works on my machine...

User avatar
CommonStray
Forum Assassin
Forum Assassin
Posts: 1215
Joined: 20 Aug 2005, 16:00
18

Post by CommonStray »

Code: Select all


function page_grab() {

$page = @mysql_real_escape_string($_GET['page']);

if (isset($page) && ($page == 'pagename')) {
          
        then do this

} elseif (isset($page) && ($page == 'pagename2')) {
        then do this

} else {
          $serv = $_SERVER['HTTP_HOST'];
          header("location: http://$serv/index.php");
          exit;
}

}

edit: you could also use case switch and break;

User avatar
Gogeta70
^_^
^_^
Posts: 3275
Joined: 25 Jun 2005, 16:00
18

Post by Gogeta70 »

Yep. There are many ways to do it.
¯\_(ツ)_/¯ It works on my machine...

User avatar
rambo
Fame ! Where are the chicks?!
Fame ! Where are the chicks?!
Posts: 232
Joined: 29 Jun 2007, 16:00
16
Contact:

Post by rambo »

Hey there, I really like the idea of the project and was just wondering if theres anymore room on the testing / bug testing team?

I have some ideas I'd like to contribute and am on holidays at the moment, So I have some time to spare.

~eroR/rambo

User avatar
Gogeta70
^_^
^_^
Posts: 3275
Joined: 25 Jun 2005, 16:00
18

Post by Gogeta70 »

Well, i suppose i do have some time. The only reason the project stopped was because everybody stopped working on it, including myself. However, i still have all the project files.

So go ahead rambo, i'm up for it.
¯\_(ツ)_/¯ It works on my machine...

Post Reply