473,413 Members | 1,755 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,413 software developers and data experts.

unexpected T_VARIABLE

Hello
I am getting the following error

Parse error: parse error, unexpected T_VARIABLE in
e:\domains\i\mysite.co.uk\user\htdocs\SaveOrder.ph p on line 16

I cant see what is wrong with line 16. can you help? Here is the code
(simplified). Line being the SQL statement
<html>
<head>
<title>Untitled Document</title>
</head>

<body>
<?php
require_once('connection.php')

$insert = "INSERT INTO tOrderItem (QuestionNo) VALUES (5)";

$add_order = mysql_query($insert) or die('Query failed: ' .
mysql_error());//$conn->

mysql_close($conn);

?>
</form>
<p></body>
</html>
Oct 22 '05 #1
3 12621
Ian Davies wrote:
Hello
I am getting the following error

Parse error: parse error, unexpected T_VARIABLE in
e:\domains\i\mysite.co.uk\user\htdocs\SaveOrder.ph p on line 16

I cant see what is wrong with line 16. can you help? Here is the code
(simplified). Line being the SQL statement
<html>
<head>
<title>Untitled Document</title>
</head>

<body>
<?php
require_once('connection.php')

$insert = "INSERT INTO tOrderItem (QuestionNo) VALUES (5)";

$add_order = mysql_query($insert) or die('Query failed: ' .
mysql_error());//$conn->

mysql_close($conn);

?>
</form>
<p></body>
</html>


the line:
require_once('connection.php')
should read:
require_once('connection.php');

Note the ending semicolon.

Cheers,
Carl.
Oct 22 '05 #2
Thanks carl
that was it
Ian
"Carl" <_Nospam_@_DO_NOT_.USE> wrote in message
news:yu*******************@newssvr14.news.prodigy. com...
Ian Davies wrote:
Hello
I am getting the following error

Parse error: parse error, unexpected T_VARIABLE in
e:\domains\i\mysite.co.uk\user\htdocs\SaveOrder.ph p on line 16

I cant see what is wrong with line 16. can you help? Here is the code
(simplified). Line being the SQL statement
<html>
<head>
<title>Untitled Document</title>
</head>

<body>
<?php
require_once('connection.php')

$insert = "INSERT INTO tOrderItem (QuestionNo) VALUES (5)";

$add_order = mysql_query($insert) or die('Query failed: ' .
mysql_error());//$conn->

mysql_close($conn);

?>
</form>
<p></body>
</html>


the line:
require_once('connection.php')
should read:
require_once('connection.php');

Note the ending semicolon.

Cheers,
Carl.

Oct 22 '05 #3
Missing semi-colon
require_once('connection.php')

Dae


Oct 23 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: mooneater | last post by:
Hallo, ich bin neu mit dem Umgang mit PHP, und ich habe folgendes (siehe unten) programmiert. Nun erhalte ich bei Aufruf meiner PHP-Datei folgende Fehlermeldung: Parse error: parse error,...
2
by: aamer | last post by:
can anyone please help me, im getting a dumb: Parse error: syntax error, unexpected T_VARIABLE in /home/jeddah/public_html/lomar/cart/remove.php on line 5 in the following file, <?php...
4
by: bovanshi | last post by:
got this annoying error I'm completly new to php... and i have no clue what is wrong here, from what i can tell there is nothing rong with this code... but that isn't what the borwser say :P ...
10
by: kilo | last post by:
Someone please see what the problem is.. I have getting an error: Parse error: syntax error, unexpected T_VARIABLE, expecting '{' in /customers/test-dig.dk/test-dig.dk/httpd.www/database.inc.php on...
1
by: mdouble | last post by:
I'm a complete novice with HTML and PHP. Recently I purchased an auto responder that requires me to edit a PHP file during the installation process as per directions provided in a read me file. ...
6
by: Philth | last post by:
No doubt this has been covered lots in detail. I think I've almost got is sorted but for this one error. "Parse error: syntax error, unexpected T_VARIABLE in...
3
by: SilvaZodiac | last post by:
Hi everyone, I'm still rather new to PHP code, and I have a syntax error. I've tried several different solutions, but it won't fix. It seems to suggest that I need a new bracket somewhere in the...
4
by: needhelp08 | last post by:
I am getting the error Parse error: syntax error, unexpected T_VARIABLE on line 4 but I can't seem to find what is wrong. Could someone please help. <?php $conn = @mysql_connect("localhost",...
8
by: illuzion | last post by:
ok I keep getting this error: Parse error: syntax error, unexpected T_VARIABLE in /home/illuzion/public_html/BAMF/contactus.php on line 38 and this error is possibly on other lines could...
7
by: ashraf02 | last post by:
i have check the code thoroughly to find the error i am still getting the following error: Parse error: syntax error, unexpected T_VARIABLE in C:\wamp\www\Catalogue.php on line 23 <!DOCTYPE html...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.