hey all,
so far i have the following script but as i\'m new to php i cannot figure out
how to actually get the id number from the databse and stick it into the \"header( )\" section
the line that is commented out is basically what i need to achieve but i
don\'t know how or if this is the right way to go and also how do i get it
into the redirect url, is \'$id\' the correct way to call it?
thanks
Matt
<?php
$db = mysql_connect(\"localhost\", \"username\", \"password\");
mysql_select_db(\"toast\",$db);
$sql=\"select from snipe_gallery_cat where username=\'$name\'\";
file://$sql=\"select from snipe_gallery_cat where id=\'$id\'\";
$result=mysql_query($sql);
$num=mysql_num_rows($result);
if($num !=0)
{
header(\"Location:http://toast.flackwell.com/gallery/index.php?cat_id=\'$id\'&a
ction=images\");
}
else
{
echo(\"error\");
}
?>