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> 3 12652
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.
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.
Missing semi-colon require_once('c onnection.php')
Dae This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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"
|
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";...
|
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>
|
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)
{
|
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...
| |
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...
|
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:...
|
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) ." | "; }
|
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
|
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());
...
|
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...
| |
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...
|
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,...
|
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...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
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
|
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...
| |