Im trying to start a cms.
the url when you click on is:
index.php?
I need to get that page data and present it on the page
i already have everything set - it seems like the url data is not getting the page info therfore doesnt display it.
What am i doing wrong?
The link url is: index1.php?name=Dest&id=427
the code in that index1.php page that suppose to get the page id is:
$ulr = end(explode('/',$_SERVER['REQUEST_URI']));
if(!empty($ulr) AND empty($catid)){
//$thread = $db->query("SELECT * FROM ".DBPREFIX."pages WHERE i_pretty_url = '$ulr' ");
$thread = $db->query("SELECT * FROM ".DBPREFIX."pages WHERE i_id = '$ulr' ");
//if index , let variable by defaut
$wsettings['wbase_title'] .= " - ".$thread['i_name'];
$wsettings['wbase_description'] = utf_substr(strip_tags($thread['i_content']), 0, 130);
$wsettings['wbase_keywords'] .= str_replace(" ",",",$thread['i_name']);
}
else{
$thread = $db->fusion("SELECT * FROM ".DBPREFIX."pages WHERE i_isindex = '1' AND i_catid = '$catid' ORDER BY i_id DESC LIMIT 1 ");
}
Thank you all in advance.