Forums »
  Shared Hosting Wallpaper Websites For Gallery Sites »
    Fix Error Parse Error: Parse Error, Unexpected T_VARIABLE In PHP Problems

Fix Error Parse Error: Parse Error, Unexpected T_VARIABLE In PHP Problems

Description: Fix Error Parse Error: Parse Error, Unexpected T_VARIABLE In PHP Problems
Tags: fix ,error ,parse ,error ,parse ,error ,unexpected ,t ,variable ,in ,php ,problems
Posted On Thu Jun 07, 2007 By maco In Shared Hosting Wallpaper Websites For Gallery Sites Forums
can you tell me why i m getting this error on my php script that i am making. i have web hosting with www.webune.com and i don't know why i am getting this error, does it have to do with the server or is it me?



Update by Admin:

ANSWER:


if you are getting this error, you are most likely missing the ; at the end of the line
Suleman Tue Apr 03, 2012
Dear Joel,
at line# 14
$ = "INSERT INTO sample (FirstName,Last VALUES ('$FirstName', 15.'$LastName') (!mysql_query($ {
please name the variable $abc etc
dmcqs Wed Feb 29, 2012
What is wrong with this? I'm getting an error with the $x: variable

<?php
joel Sat Feb 18, 2012
1.<?php
2.$db_c = mysql_connect ('localhost', 'root', '');
3.if (!$db_connect) {
4. die ('cannot connect: ' . mysql_error()); }
6.
7.$db_sele = mysql_select_db ('trial', $db_connect);
8 (!$db_select) {
9. die ('cant connect: ' . mysql_error()); }
11.$FirstName = $_POST ['FN']
12.$Last = $_POST ['LN']
13.
14.$ = "INSERT INTO sample (FirstName,Last VALUES ('$FirstName', 15.'$LastName') (!mysql_query($ {
17.die ('cant connect: ' . mysql_error());
20.mysql_close ();
21.?>

( ! ) Parse error: syntax error, unexpected T_VARIABLE in C:\wamp\www\tri on line 12


what is the problem on this???

himanshu Mon Feb 01, 2010
thanks for the help.
Iwant to know "What is mean by t_variable?".
jagadeeshstel Tue Aug 05, 2008
parse error: syntax error, unexpected t_variable in c:\xampp\htdocs\web\testlog.php on line 9
maco Thu Jun 07, 2007
ok, thanks, that worked.

thanks for your support.
hostman Thu Jun 07, 2007
can you see the problem...

look at the line where it says:

$pagtitle = 'this is my page title'

you need to end your line with a semicolon (;)

so your line should look like this:
$pagtitle = 'this is my page title';

its not the server or the service. webune is known to have a really good service.

maco Thu Jun 07, 2007
this is how it looks like:

$pagtitle = 'this is my page title'
echo $pagtitle;
if($mac == true) { return false;}
hostman Thu Jun 07, 2007
can you give show me the previous and next 10 lines of your script so i can troubleshoot it...
Information
Title: Fix Error Parse Error: Parse Error, Unexpected T_VARIABLE In PHP Problems
Info: This Post Has Been Viewed 0 Times Since
Date: Thu Jun 07, 2007
Author maco Received 9 Replies #546
Related Content
Related Pages
Related Sites
Add Your Website
Share
wallpaperama | Wallpapers | Forums | Terms Of Service

copyright © 2013 wallpaperama - All Rights Reserved - Last Updated Wed Jun 19, 2013 (-8 GMT)
Powered by: Webune Forums V5