For Programmers: Free Programming Magazines  


Home > Archive > PHP Programming > July 2005 > Unexpected T-VARIABLE









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Unexpected T-VARIABLE
Maximus

2005-07-28, 5:00 pm

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

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

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

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

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2010 codecomments.com