I need help....

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Papua
Forum Newbie
Posts: 1
Joined: Fri Jan 18, 2008 9:48 am

I need help....

Post by Papua »

So i have problem , I don´t know how to get this example url: index.php?page=foto&action=sky ,
if i know that this script is for index.php?page=foto

<?php
if (isset($_GET['page'])){
$soubor=$_GET['page'];
$soubor2= dirname($_SERVER['SCRIPT_FILENAME'])."/".$soubor.".inc";
if(file_exists($soubor2)){
if(substr_count($soubor,"../")>0){
echo "error";
}elseif($soubor=="index" or $soubor=="/index"){
echo "error";
header("HTTP/1.0 404 Not Found");
}else{

include $soubor2;
}
}else{
include "error404.inc";
}
}else{
include "index.inc";
}
?>


I am amateur ....Pls help me......thank a lot...
User avatar
markusn00b
Forum Contributor
Posts: 298
Joined: Sat Oct 20, 2007 2:16 pm
Location: York, England

Re: I need help....

Post by markusn00b »

Sorry, what?

That's not nearly enough of a description for anyone to help..
User avatar
Jonah Bron
DevNet Master
Posts: 2764
Joined: Thu Mar 15, 2007 6:28 pm
Location: Redding, California

Re: I need help....

Post by Jonah Bron »

I assume you want to get a hold of GET page and action. This should be it:

Code: Select all

<?php
if (isset($_GET['page']) && isset($_GET['action']){ 
$soubor = $_GET['page'];
$action = $_GET['action'];
// and continue on with your code...
?>
Post Reply