Hi all I am stuck with a problem of passing a $_GET[] variable via a header line. Here is my code :: [code] if( $_POST["submit"]){ $mid = $_GET['id']; $mname = $_POST['threadname']; $mbody = $_POST['threadbody']; $mtime = $_POST['threadtime']; $sqled = "INSERT INTO messagereply (threadid,replytime,replyname,replybody) VALUES ('$mid','$mtime','$mname','$mbody')"; $resulted = mysql_query($sqled) or die(mysql_error()); if ($resulted){ header("Location: message_board_view.php?id=".$mid); } } ?> [/code] $_GET['id'] is a variable passed from a previous page stored in $mid. Everything works great, the query and header until I add $mid on the end of my header message where I get the following error on the target page after submiting the form:: [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 [/quote] Any help would be greatly appriciated. Cheers Mirek