Well,
I have a database with guides on it, sorted by their ID, which is auto increment and the primary key.
What I'm trying to do is have a page called guides.php, this will show a table containing the guide names with links to the guides.
The links will be guides.php?id=1
ID number according to the ID in the database.
The guide page will display the information from the database.
Guide Name: $_GET['quest_id'];
As you can probably tell, I'm really knew to the $_GET variable so I'm not sure where to start. I've probably even messed up trying to explain it.
<?php
$host = "-----";
$user = "-------";
$pass = "------";
$db = "------";
$guide_id = $_GET['guide_id'];
if ($guide_id == NULL) {
echo "Table of guide names";
}
$ms = mysql_pconnect($host, $user, $pass);
if ( !$ms )
{
echo "Error connecting to database.\n";
}
mysql_select_db($db);
mysql_query("SELECT * FROM guides WHERE id = '".mysql_real_escape_string($id)."'");
mysql_query("SELECT * FROM guides WHERE guidename = '".mysql_real_escape_string($guide_name)."'");
echo ("$guide_id");
echo ("$guide_name");
?>
Above is my very poor attempt at trying to do it.
Any help is greatly appreciated.