954,561 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Parse error: syntax error, unexpected '='

i know this is a simple error but i just couldnt spot the error and i run the query seems fine. really appreciated... pleasee help

Parse error: syntax error, unexpected '=' in D:\xampp\htdocs\book\admin-order-details.php on line 16

<?php
$objConnect = mysql_connect("localhost","root","boon84") or die(mysql_error());
$objDB = mysql_select_db("db-test");
$id = $_GET['id'];
strSQL = "SELECT * FROM order_detail WHERE orderid='$id'";
$result=mysql_query($strSQL);
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
?>
issaru07
Light Poster
40 posts since Jan 2012
Reputation Points: 10
Solved Threads: 0
 

You need to add a $ in front of the strSQL variable in line 6.

ctaylo21
Junior Poster in Training
67 posts since May 2010
Reputation Points: 10
Solved Threads: 11
 
You need to add a $ in front of the strSQL variable in line 6.

thanks.. dont understand why i still cannot spot easy error. guess reallly too tired

issaru07
Light Poster
40 posts since Jan 2012
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You