Unexpected T-VARIABLE



<?
session_start();
require_once('db.inc.php');
$id=$_GET['id'];
if(!$id) {
header('Location: main.php');
} else {

mysql_select_db("tbl_posts")
$sql=mysql_query"SELECT * FROM tbl_posts WHERE post_id ='" .$id. "'";
$r=mysql_fetch_array($sql);
}
?>

can anyone tell me what's wrong with this code?
it keeps givin me:

Parse error: syntax error, unexpected T_VARIABLE in C:\Program
Files\Apache Group\Apache2\htdocs\secretBox\viewtopic.php on line 10

.



Relevant Pages

  • RE: BandwidthD syntax error?
    ... Subject: BandwidthD syntax error? ... Opening dc0 ... Syntax Error "parse error" on line 40 ... This electronic transmission, ...
    (freebsd-questions)
  • BandwidthD syntax error?
    ... I just installed bandwidthd, and I get the following error when I try to ... Opening dc0 ... Syntax Error "parse error" on line 40 ...
    (freebsd-questions)
  • Assign construct and Memories
    ... building a model of a simple memory module. ... dram.v:37: parse error ... dram.v:37: error: syntax error in continuous assignment ...
    (comp.lang.verilog)
  • problem compiling JNI example
    ... I'm working on MacOS X, and I get the above error. ... HelloWorldImp.c:5: error: syntax error before "void" ... HelloWorldImp.c:6: error: parse error before '*' token ...
    (comp.lang.java.programmer)
  • Re: How to build nagios nrpe client / plugins
    ... Now I want to add some hp-ux servers, ... ../common/common.h:66: warning: no semicolon at end of struct or ... ../common/common.h:69: parse error before '}' token ... nrpe.h:31: syntax error before "typedef" ...
    (comp.sys.hp.hpux)