473,787 Members | 2,932 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

unexpected T_VARIABLE

Hello
I am getting the following error

Parse error: parse error, unexpected T_VARIABLE in
e:\domains\i\my site.co.uk\user \htdocs\SaveOrd er.php 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>Untitl ed Document</title>
</head>

<body>
<?php
require_once('c onnection.php')

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

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

mysql_close($co nn);

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

Parse error: parse error, unexpected T_VARIABLE in
e:\domains\i\my site.co.uk\user \htdocs\SaveOrd er.php 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>Untitl ed Document</title>
</head>

<body>
<?php
require_once('c onnection.php')

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

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

mysql_close($co nn);

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


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

Note the ending semicolon.

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

Parse error: parse error, unexpected T_VARIABLE in
e:\domains\i\my site.co.uk\user \htdocs\SaveOrd er.php 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>Untitl ed Document</title>
</head>

<body>
<?php
require_once('c onnection.php')

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

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

mysql_close($co nn);

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


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

Note the ending semicolon.

Cheers,
Carl.

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

Dae


Oct 23 '05 #4

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

Similar topics

4
2966
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, unexpected T_VARIABLE in C:\php5xampp-dev\htdocs\liteshop\liteshop.php on line "wo 'var $username = $ls_user;' steht"
2
1951
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 require_once('../include/top.php');?> <? $urlpara_local="clickmenuid=$clickmenuid&smenuid=$smenuid&pageNum_product_rec=$pageNum_product_rec&totalRows_product_rec=$totalRows_product_rec&totrec=$totrec";...
4
11627
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 Parse error: parse error, unexpected T_VARIABLE in main.php on line 15 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> <html> <head> <title></title>
10
2710
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 line 3 my php codes are: <? function connectDatabase() $connect=mysql_connect("test_dig_dk", "test_dig_dk", "myusercode"); $select=mysql_select_db("ib",$connect); if(!$connect || !$select) {
1
1406
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. After editing the required file (globals.php) I am directed to run the installation program on the website by using my browser. However, on doing is I am presented with an error message as follows: Parse error: parse error, unexpected...
6
1604
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 /home/fhlinux162/g/greatestalbumsever.com/user/htdocs/php/image.php on line 11" Usually something to do with a bracket missing or something, but I can't see what it is. My code is as follows. $albumNumber is being passed from via a html link to this script. "content" is the...
3
6949
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 offending line, but being amateur, I don't know where. I've tried putting one in several places, to no avail. Clearly, to solve this in a smaller period than a week I need someone with more skill to help out. Heh heh. The error is: Parse error:...
4
4413
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", "root", "password ") $rs1 = @mysql_create_db( $_REQUEST ); $rs2 = @mysql_list_dbs( $conn ); for( $row =0; $row < mysql_num_rows( $rs2 ); $row++ ) { $list .= mysql_tablename( $rs2, $row) ." | "; }
8
5865
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 someone please help me out with this it is for a contact form for a webpage that I am making for a class project but I decided to add in this contact form.... <?php
7
2225
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 PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <?php $conn = mysql_connect("localhost","root","") or die (mysql_error()); mysql_select_db("Shop_Test",$conn) or die (mysql_error()); ...
0
9655
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9497
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10363
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10169
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10110
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9964
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7517
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
4067
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.