Forum Moderators: coopster
www.yoursite.com/?p=home
www.yoursite.com/?p=services
So that the navigation calls up the relevant page. However when I type:
www.yoursite.com - It comes up with no data because none has been called...
Does anyone know how to set it up so if you go to
www.yoursite.com it goes to say the default home page?
Thanks in advance!
Also can anyone help with changing /?p=home ot a permalink:
/home/
/services/
etc?
Here is the code in the index.php:
<?
include("/includes/config.php");
include("/library/config.php");
include("/library/opendb.php");
$pagename=$_POST['p'];
$query=" SELECT * FROM pages WHERE pagename = '{$_GET['p']}'";
$result=mysql_query($query);
$num=mysql_num_rows($result);
$i=0;
while ($i < $num) {
$id=mysql_result($result,$i,"id");
$pagename=mysql_result($result,$i,"pagename");
$content=mysql_result($result,$i,"content");
?>
<?php
if (get_magic_quotes_gpc())
{
$content = stripslashes($content);
}
?>
<? echo "$content"?>
<?
++$i;
}
?>