zc1
07-07-2007, 11:24 AM
Hi,
Is the below code safe and can not be exploited
function indexpage()
{
echo "This is the index page if no other pages are specified";
}
function page1()
{
echo "This is page 1";
}
function page2()
{
echo "This is page 2";
}
switch($_GET['page'])
{
case 'page1':
page1();
break;
case 'page2':
page2();
break;
default:
indexpage();
}
So that www.yoururl.com/phpfile.php
Regards,
Garry
Is the below code safe and can not be exploited
function indexpage()
{
echo "This is the index page if no other pages are specified";
}
function page1()
{
echo "This is page 1";
}
function page2()
{
echo "This is page 2";
}
switch($_GET['page'])
{
case 'page1':
page1();
break;
case 'page2':
page2();
break;
default:
indexpage();
}
So that www.yoururl.com/phpfile.php
Regards,
Garry