Location: PHPKode > projects > Wiki Web Help > wwh/handlers/getpage.php
<?php
require_once("../config.php");

if($page==null) $page = $_GET['id'];
if(!is_numeric($page)) exit; // extra precaution

$sql = "SELECT * FROM page INNER JOIN node ON node.node_id=page.node_id WHERE node.node_id=$page";
$result = mysql_query($sql,$con) or die("Database Error ".mysql_error());

if(mysql_num_rows($result)==0){
	echo "Error - page not found";
	exit;
}

$pid = mysql_result($result, 0, 'parent_id');

if($pid > 0)
	echo stripslashes(mysql_result($result, 0, 'page_text'));

?>
Return current item: Wiki Web Help