Hi. I'm trying to have the title of my page (the title tag) created based on the title of the article. So, I need to pull this info from the database from that article. I'm having a problem getting this to work. Here's what I have so far, maybe someone can help me fix this script:
$host = "*****";
$user = "*****";
$pass = "*****";
$dbname = "*****";
$connection = mysql_connect($host,$user,$pass) or die
(mysql_errno().": ".mysql_error()."<BR>"); mysql_select_db($dbname);
$urlid = $_GET['id'];
$query = mysql_query("SELECT * FROM nuke_jreviews");
$sql = "SELECT title FROM nuke_jreviews WHERE id='$urlid'";
$result = mysql_query($sql);
$title = mysql_fetch_row($result);
echo "<title>JTA: Research Droids Reviews - $title</title>";
?>
Here is a sample page from our database:
http://www.jeditemplearchives.com/content/modules.php?name=JReviews&rop=showcontent&id=646