PDA

View Full Version : Tiny script help


Serge
05-25-2003, 03:34 PM
I got a question I have the following script:


$_GET['section'] = $section
$sectiontitle = mysql_query("SELECT section_name FROM section WHERE section_id = $section") or
die (mysql_error());


The script is supposed to get the value that is passed in though the address bar like www.surrix.net/section.php?section=2 and then take that value you and get the section name for the section id. Now my problem. How do I take the value that I'm supposed to get from the query into a variable. I have a variable for the page title which is $title I need to make it so I can somehow say $title = Surrix.net - $section_name. Any help on how I could go about doing this?

filburt1
05-25-2003, 03:39 PM
$section = $_GET['section'];

Serge
05-25-2003, 05:28 PM
Well that still doesn't answer my question but thanks for correcting my code.

Xenon
05-25-2003, 05:42 PM
after it add:


$sectitle = mysql_fetch_array($sectiontitle);
$title = 'Surrix.net - ' . $sectitle['section_name'];

Serge
05-26-2003, 10:51 PM
Thanks!