470,833 Members | 1,315 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,833 developers. It's quick & easy.

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 12425
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by mooneater | last post: by
1 post views Thread by mdouble | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.