hey there. This first appeared to be so simple, i've errors popping up everywhere. admitidly I havnt worked with php/sql for a while, but could someone please ease this insanity, what the hell am I doing wrong here ?
database; technowa_phwi1
tables; Pages
Format of 'Pages' table.
page_id
page_name
page_content
page_lastmodified
page_author
Each record has a unique page_name, and page_id. I just want to pullout the 1 record that has the page_id of X. for example, then obviously get the rest of the information, about that record, the page_content, page_lastmodified, ex cet tora.
Here's what we have so far....
<?php include ("config.php"); ?>
<?php
$page_name = $HTTP_GET_VARS['page'];
echo "GETTING INFO FOR PAGE: ";
echo $page_name;
mysql_select_db("technowa_core", mysql_connect($host, $user, $pass));
$sql = "SELECT * FROM Pages WHERE page_name = $page_name";
$result = mysql_query($sql);
echo $result['page_name'];
echo $result['page_id'];
echo $result['page_lastmodified'];
echo $result['page_author'];
?>
<?php include ("inc/header.php"); ?>
<?php include ("inc/footer.php"); ?>
Many thanks in advance.