473,549 Members | 3,048 Online
Bytes | Software Development & Data Engineering Community
+ 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..unexpecte d T_VARIABLE in C:\wamp\www\hel lo.php on line 8
Mar 11 '16 #1
1 1704
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
4398
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++ )...
1
1455
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)){ header("Location: index.php?lang=fr"); exit; }
4
3318
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, unexpected T_VARIABLE in /home/a4284579/public_html/contactformphp.php on line 27 <?php /* Subject and Email Variables*/ $emailSubject =...
3
3850
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 /home/where2st/public_html/admin/editvenue_script.php on line 110" Code is attached Thanks in advance for any help.
3
3343
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 src=\"<?=$jspath?>moderate.js?<?=VERHASH?>\" type=\"text/javascript\"></script> <? } ?> Pls help me to correct this error, thanks alot.
7
2147
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 ('$first','$last','$nickname','$email','$salary')"; $result = mysql_query($sql); echo "Thank you! Information entered.\n";
2
2979
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
1570
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 /home/a3684415/public_html/index.html on line 1 Looking at index.html, this is the code: <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD...
0
7520
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...
0
7446
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...
1
7470
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...
0
7809
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...
0
5088
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3498
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...
1
1936
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
1
1058
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
763
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...

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.