473,466 Members | 1,395 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Parse error: syntax error, unexpected T_VARIABLE in C:\AppServ\www\hello.php on line

1 New Member
Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <head>
  3.   <title>hello world </title>
  4. </head>
  5. <body>
  6.   <h1>
  7. <? pho
  8. $con=mysql_connect("localhost:3306","root","xyz123");   //line8
  9. if(!$con)
  10. {
  11. echo "failed"<br>;
  12. echo"false no:".mysqp_errno()."<br>";
  13. echo"false information:".mysqp_error()."<br>";
  14. die();
  15. }
  16. echo "success!<br>";
  17. ?>
  18. </h1>
  19. </body>
  20. </html>

This is my code..unexpected T_VARIABLE in C:\wamp\www\hello.php on line 8
Mar 11 '16 #1
1 1695
RonB
589 Recognized Expert Moderator Contributor
The cause of the error is on line 7.

Expand|Select|Wrap|Line Numbers
  1. <? pho
should be
Expand|Select|Wrap|Line Numbers
  1. <?php
Mar 11 '16 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

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",...
1
by: james2432 | last post by:
Parse error: syntax error, unexpected T_VARIABLE in /var/www/LukeSite/validateform.php on line 27 validateform.php <?php session_start(); if(empty($_SESSION)||!isset($_SESSION)){...
4
by: Graviz | last post by:
I am gettin a error message on this script can someone help me. I can't see what is wrong. Thanks in advance for any help you can give me. here is the error and code. Parse error: syntax error,...
3
by: Neil Playdon | last post by:
Hi there, this is my first ever post so please go easy on me. I am currently getting the following error message "Parse error: syntax error, unexpected T_VARIABLE in...
3
by: SUNN | last post by:
Parse error: syntax error, unexpected T_VARIABLE, expecting ',' or ';' in /Users/Sunn/Song/usersong/profile.php on line 113 This is the line 113 <script...
7
by: ambo2011 | last post by:
<HTML> <?php if($submit) { $db = mysql_connect("localhost", "root",""); mysql_select_db("learndb",$db); $sql = "INSERT INTO personnel (firstname, lastname, nick, email, salary) VALUES...
2
by: vivekphp | last post by:
<?php $auth = 0; if(isset($_SERVER)) { $uname = $_SERVER; $pwd = $_SERVER; $fp = fopen("user.txt","r"); while($line = fgets($fp))
1
by: ryepsen | last post by:
Hi, I'm new to PHP and websites. I'm using an older version of iWeb for a quick website, and when uploading get this error: Parse error: syntax error, unexpected T_STRING in...
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
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,...
0
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...
1
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: 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...

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.