PHP报错 parse syntaxerror: syntax error, unexpected T_IF in

php代码出错 请大家帮忙看看_百度知道
php代码出错 请大家帮忙看看
INSERT INTO xiaojian liuyanban (/ rows=&quot&lt,button&tijiao&)if($_POST{tijiao})( echo $sql = &&&&&$_POST{nr}&textarea&input name=&;post&tijiao&?php include(&nr&nr& value=&&/;& method=&quot, sj) VALUES (&&:& type=&&text&textarea name=& id=&form action=&quot,&&$_POST{yhm}& id=&&内容;用户名;,&sjk,now())&quot?&input name=&&gt.php&quot,form&gt:& cols=&yhm&提交&).php& type=&quot
2;add:Pwww\cs\htdocs&#92:&#92.6&#92.6\APMServ5;APMServ5: syntax error试了楼下几位朋友给的代码 还是显示错误
错误提示, unexpected T_IF in D.2
提问者采纳
;&quot:1。
应该这么写if ( $_POST[&#39。
应该这么写$_POST['* 代码 *&#47,比如Sql Server里面可能用其他字符非单双引号表示SQL语句中的字符串;]\,所以错误内容是T_IF;yhm&#39。在某些数据库; 大括号括起,使用中括号 &}&] ) {
&#47,即写上
\(&#92,需要转义;]&quot:双引号在PHP字符串中要转义;&;{&quot. 语句末尾请打上分号有几个问题,而不是用小括号. PHP中if语句中的语句块应该用 &&]}\tijiao'tijiao&#39,&#92。4,就是代表if语句语法错误,now())&quot,可以使用单引号. 在PHP中使用双引号表示的字符串中需要使用双引号;$_POST[&#39. 一点建议;nr'&&
}2;]3;&quot,\$_POST['\,第一句include没有打分号结尾;4. PHP中数组下标同C语言一样; &quot,所以慎用,而不是用大括号;&[&quot,PHP解析是报错是报第一个 &
所以字符串中应该这么写&quot
提问者评价
其他类似问题
INSERT INTO xiaojian liuyanban (&换面这个看行不行 你的第一个双引号和values后面的第一个双引号配对了$sql = ',&quot,&quot,, sj) VALUES (&,$_POST{yhm}&$_POST{nr}&,now())&#39
按默认排序
其他2条回答
$_POST{nr}&#39, sj) VALUES ('INSERT INTO xiaojian liuyanban (id, nr,&#39,&#39把sql那一行改成,now())&quot:echo $sql = &',;$_POST{yhm}';
sql语句是插入语句,怎么可以直接输出呢?
您可能关注的推广
php的相关知识
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁PHP Parse error: syntax error, unexpected T_VARIABLE | DaniWeb
7Contributors 7Replies 17Views 10 MonthsDiscussion Span
Last Updated by phpbeginners
1 post since Sep 2008
Reputation Points: 0
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
&Newbie Member
PHP Parse error: syntax error, unexpected T_VARIABLE in /home/mysite/public_html/guestbook/getdrawings.php on line 1 &?php
$dir=opendir("data");
while ($file=readdir($dir)){
if(substr($file, -3) == "xml"){
print 'data/'.$file.'|';
closedir($dir);
?& Need your suggestions to solve this problom
Featured Replies in this Discussion
... I have tested the provided code both as it currently is and with many different modifications and from what I have found, although with single character changes errors can be made, I don't think that with this code alone that a T_variable error could occure. Especially with line 1 being ... The only possible error I could see on line one (if you have an odd server) is removing the letters ... from line…
Post Contains:
3,033 posts since Sep 2007
Reputation Points: 387
Q&As Helped to Solve: 283 [?]
Skill Endorsements: 17 [?]
&Team Colleague
& Featured
PHP Parse error: syntax error, unexpected T_VARIABLE in /home/mysite/public_html/guestbook/getdrawings.php on line 1 I have tested the provided code both as it currently is and with many different modifications and from what I have found, although with single character changes errors can be made, I don't think that with this code alone that a T_variable error could occure. Especially with line 1 being &?php The only possible error I could see on line one (if you have an odd server) is removing the letters php from line 1. Other than that I would say that a global variable such as ini settings may be interfering with the script. So basically I just couldn't reproduce the error and was working for me fine.
222 posts since Feb 2008
Reputation Points: 4
Q&As Helped to Solve: 21 [?]
Skill Endorsements: 0 [?]
PHP Parse error: syntax error, unexpected T_VARIABLE in /home/mysite/public_html/guestbook/getdrawings.php on line 1
Dear sisree,
I try this script but show no error. can u give me php.ini and server details
32 posts since Aug 2008
Reputation Points: 6
Q&As Helped to Solve: 2 [?]
Skill Endorsements: 0 [?]
I think there is problem in the directory path once check that if its ok ignore this
2 posts since Sep 2008
Reputation Points: 0
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
Hello ! I try this script too, and it works very well ! I think the probleme is out there !
1 post since Aug 2009
Reputation Points: 0
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
$connection = mysql_connect($host,$usernamee,$passwordd) or die ('Could not connect to server.'); $db = mysql_select_db($database,$connection) or die ('Could not select database.'); $sqlerror = mysql_error();
//The next line is where the error is, please help me out.... $sqlinsert = "INSERT INTO usercomments(namee, emailaddress, comments, datesent) VALUES ('".$fName."', '".$emaill."', '".$commentt."', '"$datee."')";
$sqlinsertt = mysql_query($sqlinsert) or die ('Could not insert record');
if($sqlinsertt) { echo '&br&&br&RECORD INSERTED SUCCESSFULLY &br&'; }
else { echo '&br&Record cannot be inserted with Shipper Login:&br& '; //echo 'error$sqlerror'; }
3,033 posts since Sep 2007
Reputation Points: 387
Q&As Helped to Solve: 283 [?]
Skill Endorsements: 17 [?]
&Team Colleague
& Featured
$connection = mysql_connect($host,$usernamee,$passwordd) or die ('Could not connect to server.'); $db = mysql_select_db($database,$connection) or die ('Could not select database.'); $sqlerror = mysql_error();
//The next line is where the error is, please help me out.... $sqlinsert = "INSERT INTO usercomments(namee, emailaddress, comments, datesent) VALUES ('".$fName."', '".$emaill."', '".$commentt."', '"$datee."')";
$sqlinsertt = mysql_query($sqlinsert) or die ('Could not insert record');
if($sqlinsertt) { echo '&br&&br&RECORD INSERTED SUCCESSFULLY &br&'; }
else { echo '&br&Record cannot be inserted with Shipper Login:&br& '; //echo 'error$sqlerror'; }
First of all welcome to daniweb. And did you not read my signature saying not to bump old topics. Also please use code tags as they can make it easier to read your post. As for your question, the following code should do the trick: $connection = mysql_connect($host,$usernamee,$passwordd) or die ('Could not connect to server.');
$db = mysql_select_db($database,$connection) or die ('Could not select database.');
$sqlerror = mysql_error();
$fName=mysql_real_escape_string($fName);
$emaill=mysql_real_escape_string($emaill);
$commentt=mysql_real_escape_string($commentt);
$datee=mysql_real_escape_string($datee);
$sqlinsert = "INSERT INTO usercomments(namee, emailaddress, comments, datesent) VALUES ('$fName', '$emaill', '$commentt', '$datee')";
$sqlinsertt = mysql_query($sqlinsert) or die ('Could not insert record');
if($sqlinsertt)
echo '&br&&br&RECORD INSERTED SUCCESSFULLY &br&';
echo '&br&Record cannot be inserted with Shipper Login:&br& ';
//echo 'error$sqlerror';
227 posts since Jul 2009
Reputation Points: 1
Q&As Helped to Solve: 32 [?]
Skill Endorsements: 0 [?]
PHP Parse error: syntax error, unexpected T_VARIABLE in /home/mysite/public_html/guestbook/getdrawings.php on line 1 &?php
$dir=opendir("data");
while ($file=readdir($dir)){
if(substr($file, -3) == "xml"){
print 'data/'.$file.'|';
closedir($dir);
?& Need your suggestions to solve this problom
try to use getcwd. $dirPath = getcwd();
Gets the current working directory
$thePath = $dirPath.'/data/';
$dir=opendir($thePath);
Related Articles
3 replies in the PHP forum
2 replies in the PHP forum
1 reply in the PHP forum
2 replies in the PHP forum
12 replies in the PHP forum
4 replies in the PHP forum
10 replies in the PHP forum
2 replies in the PHP forum
1 reply in the PHP forum
4 replies in the PHP forum
Tags Related to this ArticleStack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.
Parse error: syntax error, unexpected 'if' (T_IF) in StatusIG.php on line 25
I really dont see any problem in my code, why this is happening, please help. Im a beginner in PHP
my LINE 25 is >> if($status == 0)
$accountdb_ip = "ip"; //Accountserver-IP
$accountdb_login = "acc"; //Accountserver-Loginname
$accountdb_pw = "psw"; //Accountserver-Passwort
$db_ip = "ip"; //DB-Server-IP
$db_login = "acc"; //DB-Server-Loginname
$db_pw = "psw"; //DB-Server-Passwort
$con = mysql_connect($db_ip, $db_login, $db_pw);
$con_account = mysql_connect($accountdb_ip, $accountdb_login, $accountdb_pw);
if (!$con)
die('Could not connect: ' . mysql_error());
$name = mysql_real_escape_string($_GET["name"], $con);
$result_id = mysql_query("SELECT * FROM player.player WHERE name='".$name."' LIMIT 1", $con);
$player_acc_id = mysql_result($result_id, 0, "account_id");
$result = mysql_query("SELECT * FROM account.account WHERE id='".$player_acc_id."'", $con);
$status = mysql_result($result, 0, "raiguard")
if($status == 0)
{echo "0";}
elseif($status == 1)
{echo "1";}
elseif($status == 2)
{echo "2";}
mysql_close($con);
mysql_close($con_account);
closed as off-topic by , , , ,
This question does not appear to be about programming within the scope defined in the .
If this question can be reworded to fit the rules in the , please .
You missed the semicolon on the end of:
$status = mysql_result($result, 0, "raiguard")
Replace it with:
$status = mysql_result($result, 0, "raiguard");
1,30731525
Not the answer you're looking for?
Browse other questions tagged
Stack Overflow works best with JavaScript enabledBasic Registration form in PHP with MySQL database connectivity -
You are here:
/ Basic Registration form in PHP with MySQL database connectivity
Web & PHP Developer, with a zeal experience of web and application development on various platform like Android, iOS, PHP, MySQL, CMS, Wordpress, Joomla, Magento and Drupal.
April 23, 2015
November 7, 2014
February 24, 2014
Proudly made in India · Copyright 2014 · All rights reserved
Scroll To TopParse Error:
Syntax Error, Unexpected T_elseif
hello, i am having a problem in my cron file that runs daily,the code posted below at the last block at the&elseif ($chance & 2.5)&b&Parse error&/b&:& syntax error, unexpected T_ELSEIF in &b&/home/content/run_daily.php&/b& on line &b&240&/b&&br /&...$db = $dbh-&prepare(&select star_id from {$game}_stars where event_random = '6'&);$db-&execute();$bh_sys = $db-&fetchrow_hashref();if ($bh_sys) {&&&$chance = rand(5);&&&if ($chance & 1) {&&&&&&mysql_query(&update {$game}_stars set event_random = 1, metal = '0', fuel='0', star_name = 'BlackHole' where star_id = '$bh_sys-&{star_id}'&);&&&&&&mysql_query(&insert into {$game}_news (timestamp, headline, login_id) values (&.time().&,'The &b&SuperNova Remnant&/b& in &b class=b1&system $bh_sys-&{star_id}&/b& has formed into a &b&blackhole&/b&. Being a slow process, all ships managed to get out to system #&b&1&/b&. We expect no further trouble from that system. &font color=lime&- - - Science Institute of Sol - - -&/font&','-11')&);&&&&&&$db = $dbh-&prepare(&select location,login_id,ship_id,ship_name from {$game}_ships where location = '$bh_sys-&{star_id}'&);&&&&&&$db-&execute();&&&&&&while ($ship_bh = $db-&fetchrow_hashref()) {&&&&&&&&&mysql_query(&update {$game}_ships set location = '1' where ship_id = '$ship_bh-&{ship_id}'&);&&&&&&&&&mysql_query(&insert into {$game}_messages (timestamp,sender_name,sender_id, login_id, text) values(&.time().&,'BlackHole','$ship_bh-&{login_id}','$ship_bh-&{login_id}','Your ship the &b class=b1&$ship_bh-&{ship_name}&/b& escaped a blackhole forming from a SuperNova Remnant in system #&b&$ship_bh-&{location}&/b&. It is now in system #&b&1&/b&')&);&&&&&&&&&&&&mysql_query(&update {$game}_users set location = '1' where location = '$bh_sys-&{star_id}'&);&&&&&&print &\nSN remnant in $bh_sys-&{star_id} to blackhole\n&;&&&}&&& elseif ($chance & 2.5) {&&&&&&mysql_query(&update {$game}_stars set event_random = '14' where star_id = '$bh_sys-&{star_id}'&);&&&&&&mysql_query(&insert into {$game}_news (timestamp, headline, login_id) values (&.time().&,'After much study, we have decided that the star in system &b&$bh_sys-&{star_id}&/b& will &b class=b1&not&/b& become a Blackhole, as it was not massive enough. This system will remain a harmless Super-Nova Remnant, with lots of minerals in. &font color=lime&- - - Science Institute of Sol - - -&/font&','-11')&);&&&&&&print &\nSN remnant in $bh_sys-&{star_id} safe\n&;&&&}}...Help&
Similar Tutorials
Parse Error:
Syntax Error, Unexpected T_elseif
hello, i am having a problem in my cron file that runs daily,the code posted below at the last block at the&elseif ($chance & 2.5)&b&Parse error&/b&:& syntax error, unexpected T_ELSEIF in &b&/home/content/run_daily.php&/b& on line &b&240&/b&&br /&...$db = $dbh-&prepare(&select star_id from {$game}_stars where event_random = '6'&);$db-&execute();$bh_sys = $db-&fetchrow_hashref();if ($bh_sys) {&&&$chance = rand(5);&&&if ($chance & 1) {&&&&&&mysql_query(&update {$game}_stars set event_random = 1, metal = '0', fuel='0', star_name = 'BlackHole' where star_id = '$bh_sys-&{star_id}'&);&&&&&&mysql_query(&insert into {$game}_news (timestamp, headline, login_id) values (&.time().&,'The &b&SuperNova Remnant&/b& in &b class=b1&system $bh_sys-&{star_id}&/b& has formed into a &b&blackhole&/b&. Being a slow process, all ships managed to get out to system #&b&1&/b&. We expect no further trouble from that system. &font color=lime&- - - Science Institute of Sol - - -&/font&','-11')&);&&&&&&$db = $dbh-&prepare(&select location,login_id,ship_id,ship_name from {$game}_ships where location = '$bh_sys-&{star_id}'&);&&&&&&$db-&execute();&&&&&&while ($ship_bh = $db-&fetchrow_hashref()) {&&&&&&&&&mysql_query(&update {$game}_ships set location = '1' where ship_id = '$ship_bh-&{ship_id}'&);&&&&&&&&&mysql_query(&insert into {$game}_messages (timestamp,sender_name,sender_id, login_id, text) values(&.time().&,'BlackHole','$ship_bh-&{login_id}','$ship_bh-&{login_id}','Your ship the &b class=b1&$ship_bh-&{ship_name}&/b& escaped a blackhole forming from a SuperNova Remnant in system #&b&$ship_bh-&{location}&/b&. It is now in system #&b&1&/b&')&);&&&&&&&&&&&&mysql_query(&update {$game}_users set location = '1' where location = '$bh_sys-&{star_id}'&);&&&&&&print &\nSN remnant in $bh_sys-&{star_id} to blackhole\n&;&&&}&&& elseif ($chance & 2.5) {&&&&&&mysql_query(&update {$game}_stars set event_random = '14' where star_id = '$bh_sys-&{star_id}'&);&&&&&&mysql_query(&insert into {$game}_news (timestamp, headline, login_id) values (&.time().&,'After much study, we have decided that the star in system &b&$bh_sys-&{star_id}&/b& will &b class=b1&not&/b& become a Blackhole, as it was not massive enough. This system will remain a harmless Super-Nova Remnant, with lots of minerals in. &font color=lime&- - - Science Institute of Sol - - -&/font&','-11')&);&&&&&&print &\nSN remnant in $bh_sys-&{star_id} safe\n&;&&&}}...Help&
Parse Error: Syntax Error, Unexpected T_elseif...
I can't figure out the problem with my code.& This is the error I am receiving...Parse error: syntax error, unexpected T_ELSEIF in /****/****/****/****/****/**** on line 68This is my code:----------------------------------------------------------------------------------------------------- Code: [Select]&?include &./includes/config.inc.php&;include $include_path.&countries.inc.php&;#// If user is not logged in redirect to login pageif(!isset($_SESSION[&BPLowbidAuction_LOGGED_IN&])) { Header(&Location: user_login.php&); }if($_POST['action'] == &update&) { #// Check data if ($_POST['TPL_email']) {
if (strlen($_POST['TPL_password'])&6 && strlen($_POST['TPL_password']) & 0) {
$TPL_err=1;
$TPL_errmsg=$ERR_011;
} else if (strlen($_POST['TPL_email'])&5) {
$TPL_err=1;
$TPL_errmsg=$ERR_110;
} elseif(!eregi(&^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+([\.][a-z0-9-]+)+$&,$_POST['TPL_email'])) {
$TPL_err = 1;
$TPL_errmsg = $ERR_008;
$nletter=isset($_POST['TPL_nletter']) ? $_POST['TPL_nletter'] :0;
$sql=&UPDATE BPLA_users SET email=\&&. AddSlashes($_POST['TPL_email'])
.&\&, reg_date=reg_date&
.& , nletter=\&&.
AddSlashes($_POST['TPL_nletter']);
if(strlen($_POST['TPL_password']) & 0) {
&\&, password=\&&.
md5($MD5_PREFIX.AddSlashes($_POST['TPL_password']));
$sql .= &\& WHERE nick='&.$_SESSION['BPLowbidAuction_LOGGED_IN_USERNAME'].&'&;
$res=mysql_query ($sql);
//$query = &select * from BPLA_users where nick='&.$_SESSION['BPLowbidAuction_LOGGED_IN_USERNAME'].&'&;
//$result = @mysql_query($query);
//if(!$result) {
// MySQLError($query);
//} else {
// $USER = mysql_fetch_array($result);
// $TPL_nick
= $USER['nick'];
// $TPL_email
= $USER['email'];;
// $TPL_nletter
= $USER['nletter'];
#// Redirect user to his/her admin page
$TMP_MSG = $MSG_183;
$_SESSION[&TMP_MSG&]=$TMP_MSG;
/*Header(&Location: user_menu.php&);
include &header.php&;
include &templates/template_updated.html&;
//include &header.php&;
//include phpa_include(&template_change_details_php.html&);
$TPL_err=1;
$TPL_errmsg=$ERR_112;elseif(($_POST['action'] != &update& || $TPL_errmsg !=1)) { //#// Retrieve user's data //$query = &select * from BPLA_users where nick='&.$_SESSION['BPLowbidAuction_LOGGED_IN_USERNAME'].&'&; //$result = @mysql_query($query); //if(!$result) { // MySQLError($query); //
//} else { // $USER = mysql_fetch_array($result); // $TPL_nick
= $USER['nick']; // $TPL_email
= $USER['email']; // $TPL_nletter
= $USER['nletter']; //} //echo &111 &; //include &header.php&; //include phpa_include(&template_change_details_php.html&);}if($TPL_err==1) {
//include &header.php&; //include phpa_include(&template_change_details_php.html&);} #// Retrieve user's data $query = &select * from BPLA_users where nick='&.$_SESSION['BPLowbidAuction_LOGGED_IN_USERNAME'].&'&; $result = @mysql_query($query); if(!$result) {
MySQLError($query);
$USER = mysql_fetch_array($result);
= $USER['nick'];
$TPL_email
= $USER['email'];
$TPL_nletter
= $USER['nletter']; }
include &header.php&; include phpa_include(&template_change_details_php.html&);
include &footer.php&; $TPL_err=0; $TPL_errmsg=&&;?&
Syntax Error, Unexpected T_elseif
if(mysql_num_rows($query)&==&1)
&$compny&=&mysql_query("SELECT&*&FROM&company&WHERE&value='".&$comp&."'");
&$company&=&mysql_result($compny,&0);
if(mysql_num_rows($company)&==&0)
echo&"Company&not&found";
&$getcompstt&=&mysql_query("SELECT&stat&FROM&company&WHERE&value='".&$comp&."'&LIMIT&1");
&$getcompstat&=&mysql_result($getcompstt,&0);&
elseif($getcompstat&==&"3")
Error In Db Connection : Parse Error: Syntax Error, Unexpected T_string
Parse error: syntax error, unexpected T_STRING in C:\xampp\htdocs\mywork\unique.php on line 15&html&&head&
&/title&&/head&&body&bgproperties="fixed"&&?php$dbhost&=&'localhost';$dbuser&=&'root';$dbpass&=&'';$con&=&mysql_connect($dbhost,&$dbuser,&$dbpass)&or&die&('Error&connecting&to&mysql');$dbname&=&'mywork';mysql_select_db($dbname,&$con);$sql=mysql_query(insert&into&users&(regno,name,gender,date,month,year,emailid,cell,paddress,caddress,incometype,incomeamt,dad,fyes,dadocup,mom,myes,momocup,password)&VALUES&('$_POST[regno]','$_POST[name]','$_POST[gender]','$_POST[date]','$_POST[month]','$_POST[year]','$_POST[emailid]','$_POST[cell]','$_POST[paddress]','$_POST[caddress]','$_POST[incometype]','$_POST[incomeamt]','$_POST[dad]','$_POST[fyes]','$_POST[dadocup]','$_POST[mom]','$_POST[myes]','$_POST[momocup]','$_POST[password]')");$sql1=mysql_fetch_array($sql);$result&=&@mysql_query($SQl1);$result="SELECT&*&FROM&users&WHERE&regno='$regno'";while($row&=&mysql_fetch_array($result))
&&&&//echo&$row['regno']."regno&br&";
//echo&$row['name']."name&br&";
//echo&$row['gender']."gender&br&";
//echo&$row['date']."date&br&";
//echo&$row['month']."month&br&";
//echo&$row['year']."year&br&";
//echo&$row['emailid']."emailid&br&";
//echo&$row['cell']."cell&br&";
//echo&$row['paddress']."paddress&br&";
//echo&$row['caddress']."caddress&br&";
//echo&$row['incometype']."incometype&br&";
//echo&$row['incomeamt']."incomeamt&br&";
//echo&$row['dad']."dad&br&";
//echo&$row['fyes']."fyes&br&";
//echo&$row['dadocup']."dadocup&br&";
//echo&$row['mom']."mom&br&";
//echo&$row['myes']."myes&br&";
//echo&$row['momocup']."momocup&br&";
//echo&$row['password']."password&br&";
echo&"Thanks&for&Register!";
if&(!mysql_query($sql,$con))&&{&&die('Error:&'&.&mysql_error());&&}echo&"1&record&added";
mysql_close($con);
&form&name="security"&action="index.php"&method="post"&
&input&type="submit"&value="click&here&to&login"&
&/form&&/body&&/html&
Parse Error: Syntax Error, Unexpected T_else In C:\wamp\www\pages\register.php
Strange : Parse Error: Syntax Error, Unexpected T_const In Blabla Line 41
I don`t get it, waht is wrong?! Code: [Select]&?phprequire_once&'auth.php';if&(!isset($_SESSION['SESS_VERIFY']))&{ header("location:&access-denied.php"); exit();}if&($_SESSION['lang']&==&'Ro')&{ //&setare&data&romania date_default_timezone_set('Europe/Bucharest'); $today&=&getdate(); $zi&=&$today['mday']; $luna&=&$today['mon']; $lunastring&=&$today['month']; $an&=&$today['year']; $data&=&$zi.$luna.$ $data&=&(string)$ $ora&=&date('H:i:s');& $msg&=&array(); $err&=&array(); $luni&=&array&(
1=&'Ianuarie',
2=&'Februarie',
3=&'Martie',
4=&'Aprilie',
5=&'Mai',
6=&'Iunie',
7=&'Iulie',
8=&'August',
9=&'Septembrie',
10=&'Octobrie',
11=&'Noiembrie',
12=&'Decembrie'); //&comun const&SQL_ERR&=&'SQL&statement&failed&with&error:&'; const&ADD_MODEL&=&'ADAUGA&UN&MODEL&NOU';..many&constants...}elseif&($_SESSION['lang']&==&'It')&{...Thank you!
Parse Error: Syntax Error, Unexpected T_string In W:\www\blog\index.php On Line
Parse Error: Syntax Error, Unexpected T_string In X:\xampp\htdocs\search.php On
Hi folks,I am a complete n00b at php and mysql. I am teaching myself from books and the WWW, but alas I am stuck... the error I get is:Parse error: syntax error, unexpected T_STRING in X:\xampp\htdocs\search.php on line 7here is the code:&?php&&&&mysql_connect&("localhost",&"user",&"password")&or&die&(mysql_error());&&mysql_select_db&("it_homehelp_test")&or&die&(mysql_error());&&&&$term&=&$_POST['term'];&&$sql&=&$mysql_query(select&*&from&it_homehelp_test&where&ClientName1&like&'%term%');&&&&&&------this&is&line&7&&while&($row&=&mysql_fetch_array($sql)){&&
echo&'Client&Name:'&.$row['ClientName1'];
echo&'Address:'&.$row['Address1'];
echo&'Phone:'&.$row['Tel1'];
}?&Any help you can offer would be great. I can also post the &.html& file that creates the search bar if it is needed.Thanks
Parse Error: Syntax Error, Unexpected T_string In /home/webspace/public_html/eri
Parse Error: Syntax Error, Unexpected T_if In /var/www/html/homework9/recordsurv
I just enabled error reporting and I am not that familiar with it.& I know I have an error some where around line 33.& I know I am missing a bracket or a comma or some other syntax error I just cannot find where the error is.& Below is my script.Thanks for any help. Code: [Select]&!DOCTYPE html PUBLIC &-//W3C//DTD XHTML 1.0 Strict//EN&&http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&&&html xmlns=&http://www.w3.org/1999/xhtml&&&head&&title&Airline Survey&/title&&meta http-equiv=&content-type& content=&text/ charset=iso-8859-1& /&&meta name=&author& content=&Revised by abc1234&/&&/head&&body&&?php$WaitTime&=&addslashes($_POST["wait_time"]);$Friendliness&=&addslashes($_POST["friendliness"]);$Space&=&addslashes($_POST["space"]);$Comfort&=&addslashes($_POST["comfort"]);$Cleanliness&=&addslashes($_POST["cleanliness"]);$Noise&=&addslashes($_POST["noise"]);if&(empty($WaitTime)&||&&&&empty($Friendliness)&||&&&&empty($Space)&|| empty($Comfort)&||&&&&empty($Cleanliness)&||&&&&empty($Noise))&&&&echo&"&hr&/&&p&You&must&enter&a&value&in&each&field.&Click&&&&&your&browser's&Back&button&to&return&to&the&form.&/p&&hr&/&";else&{&&&&&&&&$Entry&=&$WaitTime&.&"\n";&&&&&&&&$Entry&.=&$Friendliness&.&"\n";&&&&&&&&$Entry&.=&$Space&.&"\n";&&&&&&&&$Entry&.=&$Comfort&.&"\n";&&&&&&&&$Entry&.=&$Cleanliness&.&"\n";&&&&&&&&$Entry&.=&$Noise&.&"\n";&&&&&&&&$SurveyFile&=&fopen("survey.txt",&"w")
}&&&&&&&&if&(flock($SurveyFile,&LOCK_EX))&{&&&&&&&&&&&&&&&&if&(fwrite($SurveyFile,&$Entry)&&&0)&{&&&&&&&&&&&&&&&&&&&&&&&&echo&"&p&The&entry&has&been&successfully&added.&/p&";&&&&&&&&&&&&&&&&&&&&&&&&flock($SurveyFile,&LOCK_UN;&&&&&&&&&&&&&&&&&&&&&&&&fclose($SurveyFile);
&&else&&&&&&&&&&&&&&&&&&&&&&&&echo&"&p&The&entry&could&not&be&saved!&/p&";&&&&&&&&}&&&&&&&&else&&&&&&&&&&&&&&&&echo&"&p&The&entry&could&not&be&saved!&/p&";}?d&&p&&a&href="AirlineSurvey.html"&Return&to&Airline&Survey&/a&&/p&&/body&&/html&
Parse Error: Syntax Error, Unexpected T_string Received When Uploading Files
I have been trying to get my files to upload onto a computer and I receive this message: Parse error: syntax error, unexpected T_STRING in /home/content/19/6550319/html/listing.php on line 27. Line 27 is how the php logs into my SQL. The problem is that I was able to log in before. I just made changes to the form by adding a dropdown menu and price and now it says it doesnt parse.Can anyone figure this out. I will include the code without the login information because the forum is public but I did put the words left out for you to see where I took out the passcodes. Code: [Select]&?php//This&is&the&directory&where&images&will&be&saved$target&=&"potofiles/";$target&=&$target&.&basename(&$_FILES['photo']['name']);//This&gets&all&the&other&information&from&the&form$price=$_POST['price'];$gig=$_POST['giga'];$yesg=$_POST['yesg'];$pic=($_FILES['photo']['name']);$pic2=($_FILES['phototwo']['name']);$pic3=($_FILES['photothree']['name']);$pic4=($_FILES['photofour']['name']);$description=$_POST['iPadDescription'];$condition=$_POST['condition'];$fname=$_POST['firstName'];$lname=$_POST['lastName'];$email=$_POST['email']//&Connects&to&your&Databasemysql_connect&("left&out",&"left&out",&"left&out")&or&die(mysql_error())&;mysql_select_db("left&out")&or&die(mysql_error())&;//Writes&the&information&to&the&databasemysql_query("INSERT&INTO&listing&(price,giga,yesg,photo,phototwo,photothree,photofour,iPadDescription,condition,firstName,lastName,email)VALUES&('$price',&'$gig',&'$yesg',&'$pic',&'$pic2',&'$pic3',&'$pic4',&'$description',&'$condition',&'$fname',&'$lname',&'$email')")&;//Writes&the&photo&to&the&serverif(move_uploaded_file($_FILES['photo']['tmp_name'],&$target)){//Tells&you&if&its&all&okecho&"The&file&".&basename(&$_FILES['uploadedfile']['name']).&"&has&been&uploaded,&and&your&information&has&been&added&to&the&directory";}else&{//Gives&and&error&if&its&notecho&"Sorry,&there&was&a&problem&uploading&your&file.";}echo&date("m/d/y&:&H:i:s",&time())&?&
Parse Error: Syntax Error, Unexpected T_encapsed_and_whitespace, Expecting T_str
Hi all,Does anybody can help me with this error...?I am trying create a simple form which insert data into mysql table called 'sample'Here is my code... Code: [Select]&?php $connection&=&mysql_connect("localhost","root",&"123");
if(!$connection)
die("db&connection&error"&.mysql_error());
} $db_select&=&mysql_select_db("project",&$connection);
if(!$db_select)
die("db&select&error"&.mysql_error());
} $sql&=&"INSERT&INTO&sample&(id,firstname,lastname,bio,gender)
&&&&VALUES&('$_POST['ID_']','$_POST['firstname']','$_POST['lastname']','$_POST['bio']','$_POST['gender']')";
die('Error:&'&.&mysql_error());
echo&"1&record&added";?&And every time I am getting this annoying error
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in C:\wamp\www\project\process.php on line 19
and Line 19 is
Code: [Select]('$_POST['ID_']','$_POST['firstname']','$_POST['lastname']','$_POST['bio']','$_POST['gender']')&;Thanks in advance..! :-)
Assistance Appreciated - Parse Error: Syntax Error, Unexpected T_variable
Hey, I just started using&WordPress&- I'm a complete newbie, and am super perplexed by this error I'm getting in functions.php. I'm hoping I am just making a simple mistake, but I'd really appreciate some suggestions as to what the issue is.&The error:&Parse error: syntax error, unexpected T_VARIABLE in&/homepages/33/d/htdocs/rap3/wp-content/themes/business-turnkey/functions.php&on line&196That line would be at the very bottom of my code. From what I can tell, this error occurs when the code is missing a punctuation mark like a [ ( { , ' etc. I've been looking over the code for ages, and from what I can see all the brackets have a matching end, there's no out of place punctuation.&
&?php & & &
define('THEME_URI', get_stylesheet_directory_uri());
define('THEME_IMAGES', THEME_URI . '/assets/img');
define('THEME_CSS', THEME_URI . '/assets/css');
define('THEME_JS', THEME_URI . '/assets/js');
define('THEME_TEMPLATES', THEME_URI . '/assets/templates'); &&
$GLOBALS['content_width'] = 900;
/* Define Theme Defaults */
$options = get_option('turnkey_theme_options');&
if($options['templatestyle'] == null)
$options['templatestyle'] = 'modern'; & &&
if($options['typography'] == null)
$options['typography'] = 'typography1';
function turnkeySlider() { &&
& $options = get_option('turnkey_theme_options'); &
& & & & & & & &&
if($options['sliderTimer'] != null)
$rotateTimer = $options['sliderTimer'];
$rotateTimer = 5000;
& & & & &&
&script type="text/javascript" charset="utf-8"& & &&
jQuery(document).ready(function($) { &
$('.slide-container').cycle({ fx: 'scrollHorz',next: '#slide-nav .next',prev: '#slide-nav .prev',pause: 1, timeout:&?php echo $rotateT ?&});
add_action('wp_head', 'turnkeySlider');
require_once ( get_stylesheet_directory() . '/theme-options.php' );
require_once ( 'slider/turnkey-slider.php' );
if (function_exists('register_sidebar')) {
register_sidebar(array(
'name'=& 'Homepage Widgets',
'id' =& 'homepage_widgets',
'before_widget' =& '&div class="widget group %2$s"&',
'after_widget' =& '&/div&',
'before_title' =& '&h3&',
'after_title' =& '&/h3&'
register_sidebar(array(
'name'=& 'Sidebar 1',
'id' =& 'sidebar_1',
'before_widget' =& '&div class="widget group %2$s"&',
'after_widget' =& '&/div&',
'before_title' =& '&h4&',
'after_title' =& '&/h4&'
register_sidebar(array(
'name'=& 'Sidebar 2',
'id' =& 'sidebar_2',
'before_widget' =& '&div class="widget group %2$s"&',
'after_widget' =& '&/div&',
'before_title' =& '&h4&',
'after_title' =& '&/h4&'
register_sidebar(array(
'name'=& 'Footer Widgets',
'id' =& 'footer-widgets',
'before_widget' =& '&div class="widget group %2$s"&',
'after_widget' =& '&/div&',
'before_title' =& '&h3&',
'after_title' =& '&/h3&'
if ( function_exists( 'register_nav_menus' ) ) {
register_nav_menus(
'turnkey_mainnav' =& 'TurnKey Main Navigation',
'turnkey_secondary' =& 'TurnKey Secondary Navigation'
add_theme_support( 'post-thumbnails' );
// Makes Sure thumbnails show up in RSS
function do_post_thumbnail_feeds($content) {
if(has_post_thumbnail($post-&ID)) {
$content = '&div&' . get_the_post_thumbnail($post-&ID) . '&/div&' . $
add_filter('the_excerpt_rss', 'do_post_thumbnail_feeds');
add_filter('the_content_feed', 'do_post_thumbnail_feeds');
// Define Thumbnail Images Sizes
if ( function_exists( 'add_image_size' ) ) {
add_image_size( 'post-thumb-threecol', 390, 200, true );
add_image_size( 'post-thumb-onetwocol', 520, 200, true );
/* Slide Image */ add_image_size( 'special', 580, 340, true );
if ( !is_admin() ) { // instruction to only load if it is not the admin area
function googlejquery() {
& &wp_deregister_script( 'jquery' );
& &wp_register_script( 'jquery', 'http:///ajax/libs/jquery/1.7.2/jquery.min.js');
add_action('init', 'googlejquery');
wp_register_script('functions',
& & &get_bloginfo('template_directory') . '/assets/js/functions.js');
& wp_register_script('cycle',
& & &get_bloginfo('template_directory') . '/assets/js/cycle.min.js');
& wp_register_script('lightbox',
& & &get_bloginfo('template_directory') . '/assets/js/lightbox_me.js');
& &// enqueue the script
& &wp_enqueue_script('jquery');&
& &wp_enqueue_script('functions');
& &wp_enqueue_script('cycle');
& &wp_enqueue_script('lightbox');&
function the_breadcrumb() {
if (!is_home()) {
echo '&a href="';
echo get_option('home');
echo '"&';
bloginfo('name');
echo "&/a& & ";
if (is_category() || is_single()) {
the_category('title_li=');
if (is_single()) {
echo " & ";
the_title();
} elseif (is_page()) {
echo " &span class='current'& ";
echo the_title();
echo " &/span& ";
function rap_register_sidebars() {
& & register_sidebar(array(
& & & & 'name' & & & & & & &=& 'Scheduling campaign sidebar',
& & & & 'id' & & & & & & & &=& 'rap-scheduling-sidebar',
& & & & 'description' & & & =& 'Sidebar for Scheduling Campaign template pages only.',
& & & & 'before_widget' & & =& '&div class="widget"&',
& & & & 'after_widget' & & &=& '&/div&',
& & & & 'before_title' & & &=& '&h2 class="widget-title"&',
& & & & 'after_title' & & & =& '&/h2&'
// Add Automatic Feed Links
add_theme_support('automatic-feed-links');
add_filter('widget_text', 'do_shortcode');
add_action('widgets_init', 'rap_register_sidebars');
// Below added by Jessica 6/24/13 to display Salesforce lookup fields on Gravity Forms field mapping page
add_filter('gf_salesforce_skip_reference_types', '__return_false');&
// Below added by Jessica to change the field value on the Join Us and Training forms
add_action("gform_pre_submission_1", "pre_submission_JoinUs");
add_action("gform_pre_submission_8", "pre_submission_Training");
add_action("gform_pre_submission_15", "pre_submission_HCAP");
function pre_submission_JoinUs($form){
if ($_POST["input_15"] == 'Former Retail Worker') $_POST["input_15"] = 'Retail Worker';
function pre_submission_Training($form){
if ($_POST["input_18"] == 'Former Retail Worker') $_POST["input_18"] = 'Retail Worker';
function pre_submission_HCAP($form){
if ($_POST["input_15"] == 'Former Retail Worker') $_POST["input_15"] = 'Retail Worker';
Edited by motprogram, 11 December 2014 - 04:33 PM.
Parse Error: Syntax Error, Unexpected T_object_operator, Expecting T_paamayim_ne
Hey, Its something to do with the ' or \ I know that as Ive been trying alot. Code Code: [Select]if ($this-&isAdmin && count ($func_players) & SettingsManager::GetSetting(Settings::BAN_LIMIT))
return $this-&sendErrorBox('max', 'You can\'t ban that many Users at once!', 'Gosh', 'iBan');
& & & foreach($func_players as $func_player) $func_player-&ban(&this-&playerName, $this-&isAdmin);
& return $this-&sendErrorBox('max', sprintf(
& '%s ha%s been banned.' & $this-&getPlayerString($func_players), & &count($func_players) == 1 ? 's' : 've'), & &'SykoPwns:P', 'Sykos:iBan');Thanks for your help! Ive tried alot of things I think I could just take out the \ or something!!
Moved: Parse Error: Syntax Error, Unexpected $end, Expecting T_function
This topic has been moved to Third Party PHP Scripts./forums/index.php?topic=
Parse Error: Syntax Error, Unexpected '*', Expecting Function (t_function) In
I just edited the tablerate.php in magento, and now I am getting this error, but I don't know what's wrong. Anybody here can help me?
The error message reads "Parse error: syntax error, unexpected '*', expecting function (T_FUNCTION) in&/home/echoshom/public_html/app/code/core/Mage/Shipping/Model/Carrier/Tablerate.php&on line&50"
Attached is tablerate.php
Attached Files
&Tablerate.php &&9.23KB
&&2 downloads
Newbie: Parse Error: Syntax Error, Unexpected T_string, Expecting ',' Or ';'
Parse Error: Syntax Error, Unexpected T_constant_encapsed_string In Date Stamp
I am getting syntax error, unexpected T_CONSTANT_ENCAPSED_STRINGon the date stamp line below but I can't see what is causing the problem.when I comment it out the problem goes away so I know I it is there.please help. &$email_message&=&"Form&details&below.\n\n";&$email_message&=&date("m/d/Y")"\n";
Parse Error: Syntax Error, Unexpected T_string In C:\blablah On Line 31
SET UP: Windows vista# XAMPP 1.7.3,# Apache 2.2.14 (IPv6 enabled) + OpenSSL 0.9.8l# MySQL 5.1.41 + PBXT engine# PHP 5.3.1# phpMyAdminAfter entering various different information from previous forms on different pages I finally get this error message &Parse error: syntax error, unexpected T_STRING in C:\blablah on line 31& on the following code:&?php
//let's&start&our&session,&so&we&have&access&to&stored&data
session_start();
include&'db.inc.php';$db&=&mysql_connect(MYSQL_HOST,&MYSQL_USER,&MYSQL_PASSWORD)&or&&&&&die&('Unable&to&connect.&Check&your&connection&parameters.');mysql_select_db(MYSQL_DB,&$db)&or&die(mysql_error($db));
//let's&create&the&query$query&=&'INSERT&INTO&subscriptions&(name,&email_address,&membership_type,&terms_and_conditions,
name_on_card,
credit_card_number,&credit_card_expiration_data)
"'&.&$_SESSION[$name,&$db]&.&'",
'&.&$_SESSION[$email_address,&$db]&.&'",
'&.&$_SESSION[$membership_type,&$db]&.&'",
'&.&$_SESSION[$terms_and_conditions,&$db]&.&'",
'&.&$_POST[$name_on_card,&$db]&.&'",
'&.&$_POST[$credit_card_number,&$db]&.&'",
'&.&$_POST[$credit_card_expiration,&$db]&.&')';
if&(isset($query))&{&&&&&&&&$result&=&mysql_query($query,&$db)&or&die(mysql_error($db));}?&&p&Done!&/p&&/body&&/html&?&Any help would be appreciated. I'm practicing this with the ambition to develop a multi-page registration using sessions for a website so even web pages that might help me with this aim would be good.
Soap Trouble - Parse Error: Syntax Error, Unexpected T_variable
&?phprequire_once('nusoap.php');$soap_server&=&'/api/api.cfc?wsdl';$client&=&new&soapclient($soap_server);$client-&call()$params&=&array('user'&=&&'',&&&&&&&&&&&&&&&&&&'password'&=&&'PASSWORD');$return_string&=&$client-&call('getKey',&$params);print_r($return_string);$subId&=&'XXXXXX';$params&=&array('keyStr'&=&&$keyStr,&&&&&&&&&&&&&&&'subId'&=&&$subId);$return_string&=&$client-&call('getTodaySubIDStats',&$params);print_r($return_string);unset($client);?&spits outParse error: syntax error, unexpected T_VARIABLE in /home/site82/public_html/stats.php on line 12Line 12 is...$params = array('user' =& '',&
Parse Error: Syntax Error, Unexpected T_variable, Expecting T_function
error_reporting(E_ALL);
include_once("conninfo2.php");
include_once('classes/bcrypt.php');
class User
private $_
$this-&_bcrypt = new B
if($this-&_bcrypt-&verify($password, $this-&data()-&password)){
if(isset($_POST['username'])) {
$firstname = strip_tags($_POST['firstname']);
$surname = strip_tags($_POST['surname']);
$pnumber = strip_tags($_POST['pnumber']);
$username = strip_tags($_POST['username']);
$email1 = strip_tags($_POST['email1']);
$email2 = strip_tags($_POST['email2']);
$password1 = $_POST['password1'];
$password2 = $_POST['password2'];
//code below will make sure all fields are filled in
if(trim($firstname) == "" || trim($surname) == "" || trim($pnumber) == "" || trim($username) == "username" || trim($email1) == "" || trim($email2) == "" ||trim($password1) == "" || trim($password2) == "") {
echo "Error, all fileds need to be filled in";
//code below checks that the emails entered both match one another
if($email1 != $email2) {
echo "Emails do not match, please try again";
//code below matches the passwords entered
else if($password1 != $password2) {
echo "Passwords do not match please try again";
if(!filter_var($email1, FILTER_VALIDATE_EMAIL)) {
echo "Your email is invalid, please try again";
//checks if the email exists within the database
$stmt = $db-&prepare("SELECT email FROM login WHERE email=:email1 LIMIT 1");
$stmt-&bindValue(':email1',$email1, PDO::PARAM_STR);
$stmt-&execute();
$count = $stmt-&rowCount();
catch(PDOException $e) {
echo $e-&getMessage();
//checks if the username exists
$usernameSQL = $db-&prepare("SELECT username FROM login WHERE username=:username LIMIT 1");
$usernameSQL-&bindValue(':username',$username,PDO::PARAM_STR);
$usernameSQL-&execute();
$usernameCount = $usernameSQL-&rowCount();
catch(PDOExemption $e) {
echo $e-&getMessage();
//checks if the email is already within the database
if($count & 0) {
echo "This email already exists";
//checks the username
if($usernameCount & 0) {
echo "This username is unavailable please try another";
$user = new U
$bcrypt = new B
$email1-&create(array(
'username' =& Input::get('username'),
'password1' =& $bcrypt-&hash(Input::get('password')),
'firstname' =& Input::get('name'),
'surname' =& Input::get('surname'),
'pnumber' =& Input::get('pnumber'),
'email1' =& Input::get('email'),
'ipaddress' =& Input::get('ipaddress'),
'signup_date' =& date('Y-m-d H:i:s'),
'group' =& 1
//grab the last id used within the database
$lastId = $db-&lastInsertId();
$stmt3 = $db-&prepare("INSERT INTO activated (user, token) VALUES ('$lastId', :token)");
$stmt3-&bindValue(':token',$token,PDO::PARAM_STR);
$stmt3-&execute();
//email activation
$from = "From Auto Responder @ Mediaedit &&";
$subject = "IMPORTANT: Please activate your account";
$link = 'http://mediaed.it/roxanne/activate.php?user='.$lastId.'&token='.$token.'';
//email body
$message = "
Thanks for register with Mediaedit, before your able to use our services you will need to verify your email so that we know your human
$headers = 'MIME-Version: 1.0' . "rn";
$headers .= "Content-type: textrn";
$headers .= "From: Mediaedit";
//send email now
mail($email1, $subject, $message, $headers, '-f noreply@mediated.it');
$db-&commit();
echo "Thanks for registering, before you can us our services you need to activate your account an email has been sent which you will recieve shortly";
catch(PDOException $e){
$db-&rollBack();
echo $e-&getMessage();
i keep getting&Parse error: syntax error, unexpected T_VARIABLE, expecting T_FUNCTION&
Parse Error: Syntax Error, Unexpected T_object_operator In /export/soi-50/studen
sorry this was the actuall php code for this error...&?phprequire_once &DataObject.class.php&;class LogEntry extends DataObject {&&&protected $data = array(&&&&userid& =& &&,&&&&pageUrl& =& &&,&&&&numVisits& =& &&,&&&&lastAcces& =& &&,);public static function getLogEntries( $userid ) {&&&$conn = parent::connect();&&&$sql = &SELECT * FROM & . TBL_accesslog . & WHERE userid = : userid &&&&&&ORDER BY lastAcces DESC&;&&&&&&try {&&&&&&$st = conn-&prepare( $sql );&&&&&&$st-&bindValue( &:userid&, $userid, PDO::PARAM_INT );&&&&&&$st-&execute();&&&&&&$logEntries = array();&&&&&&foreach ( $st-&fetchAll() as $row ) {&&&&&&&&&$logEntries[] = new logEntry( $row);&&&&&&}&&&&&&&&&&&&parent::disconnect( $conn );&&&&&&return $logE&&&}& &catch ( PDOExeception $e ) {&&&&&&parent::disconnect( $conn );&&&&&&die( &Query failed: & . $e-&getMessage() );&&&&&&&&&&&&}&&&&&&}&&&}?&&&&
Parse Error: Syntax Error, Unexpected $end In W:\www\blog\login.php On Line 33
I keep getting an error code when running my php, it states:Parse error: syntax error, unexpected $end in W:\www\blog\login.php on line 33Line 33 is &/html& Code: [Select]&?phpmysql_connect&("localhost",&"root",&"");mysql_select_db("blog");?&&html&&head&&title&Login&/title&&/head&&body&&?phpif(isset($_POST['submit'])){$name&=&$_POST['name'];$pass&=&$_POST['password'];$result&=&mysql_query("SELECT&*&FROM&users&WHERE&name='$name'&AND&pass='$pass'");$num&=&mysql_num_rows($result);if($num&==&0){echo&"Bad&login,&go&&a&href='login.php'&back&/a&";}else{session_start();$SESSION&['name']&=&$header("Location:&admin.php");}?&&form action='login.php' method='post'&Username: &input type='text' name='name' /&&br /&Password: &input type='password' name='password' /&&br /&&input type='submit' name='sumbit' value='Login!' /&&/form&&/body&&/html&Can any one advise me whats wrong?
Parse Error: Syntax Error, Unexpected $end In /home1/user/public_html...
Hey Everyone,I'm getting this error when I submit my contact form.Parse error: syntax error, unexpected $end in /home1/user/public_html/contact/process.php on line 22I got this code from a video on youtube. /watch?v=rdsz9Ie6h7IIf I made a mistake or TYPO please let me know. Thanks!Here's my code:&?php$emailSubject&=&'Contact&Form&Submission';$sendto&=&'';$nameField&=&$_Post['name'];$emilField&=&$_Post['email'];$phoneField&=&$_Post['phone'];$SubjectField&=&$_Post['subject'];$messageField&=&$_Post['message'];$body&=&&&&EOD&br&&hl&&br&This&Form&was&submitted&from&the&&contact&page.&br&Name:&$name&br&E-Mail:&$email&br&Phone:&$phone&br&Subject:&$subject&br&Message:&$message&br&BOD;
$headers&=&"FROM:&$email\r\n";
$headers&.="Content-Type:&text/html\r\n";
$success&=&mail($sendto,&$emailSubject,&$body,&$headers);?&
Parse Error: Syntax Error, Unexpected T_variable In /var/www/testing/index.php

我要回帖

更多关于 parse syntax 的文章

 

随机推荐