Log in

View Full Version : Tutorial please.



Mr Macro
30-05-2007, 04:37 PM
How do i do the PHP navigation things like ?page=home ?

Blob
30-05-2007, 04:42 PM
<?php
if( isset( $_GET["page"] ) )
{
$string = $_GET["page"];
$string = preg_replace( "([^a-zA-Z0-9])", "", $string );
if( file_exists( $string . ".php" )
{
include( "$string.php" );
}
else
{
include( "404.php" );
}
}
?>

:Edzy
30-05-2007, 04:43 PM
Ignore plz

Mr Macro
30-05-2007, 04:45 PM
<?php
if( isset( $_GET["page"] ) )
{
$string = $_GET["page"];
$string = preg_replace( "([^a-zA-Z0-9])", "", $string );
if( file_exists( $string . ".php" )
{
include( "$string.php" );
}
else
{
include( "404.php" );
}
}
?>


Ah wait i get it thanks alot, REP+

RYANNNNN
30-05-2007, 05:12 PM
Ah wait i get it thanks alot, REP+

I doubt you do. I bet you just though, thanks for the code. I'm not going to bother learning because I can just ask on habbox for help all the time.

:Edzy
30-05-2007, 05:23 PM
I doubt you do. I bet you just though, thanks for the code. I'm not going to bother learning because I can just ask on habbox for help all the time.
lolololol - chillax

Want to hide these adverts? Register an account for free!