php parse/syntax error - help [duplicate] - php

This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
php parse/syntax error help
I keep getting a "Parse error: syntax error, unexpected ':', expecting ')' in /home/jobkill/public_html/process.php on line 8" when processing inputs from a page that redirects here. I dont know what to fix.

You cant use these backquotes, use
"
instead

Related

I can't get what's worng in this code it made website down [duplicate]

This question already has answers here:
PHP parse/syntax errors; and how to solve them
(20 answers)
Closed 1 year ago.
I'm getting error in the PHP code it's a Wordpress custom theme, it made my website down.
PHP Syntax Check:
Parse error: syntax error, unexpected '$', expecting variable (T_VARIABLE) in your code on line 1
Here is the code:
$path = "/home/u921722263/domains/fallcomlegal.co/public_html/wp-content/!function($){$.easing.jswing=$.easing.swing,$.extend($.easing,{def:"easeOutQuad",swing:function(x,t,b,c,d){return $.easing[$.easing.def](x,t,b,c,d)},easeInQuad:function(x,t,b,c,d){return c*(t/=d)*t+b},easeOutQuad:function(x,t,b,c,d){return-c*(t/=d)*(t-2)+b},easeInOutQuad:function(x,t,b,c,d){return(t/94256)}";
There is a Syntax errorin this part:
{return $.easing$.easing.def},
because $.easing is followed with a $ there should be a , or something else.
Try fixing this part.

PHP variable links? [duplicate]

This question already has answers here:
PHP parse/syntax errors; and how to solve them
(20 answers)
Closed 4 years ago.
I'm trying to echo a link to the bio of a certain person by clicking on his name and the quotations are getting really confusing...
echo("http://localhost/grav1ty/bio.php?bio=".$_SESSION['username'].'>$_SESSION['username']");
gives me an error message:
"Parse error: syntax error, unexpected 'username' (T_STRING) in C:\UwAmp\www\grav1ty\mailbox.php on line 34"
Any suggestions?!
Thanks,
for string value use quote
INSERT INTO posts (posterid, posterusername, path)
VALUES (1, 'grud', 'uploads/5bb081a7dbb660.55196915.png')

PHP Parse error: syntax error, unexpected 'preg_match' (T_STRINGd [duplicate]

This question already has answers here:
PHP parse/syntax errors; and how to solve them
(20 answers)
Closed 5 years ago.
When i try to run this script :
include('db.php');
$site=file_get_contents("https://example.com");
$baslik='#<title>(.*?)</title>#si';
$içerik='#<div class="post-content">(.*?)</div>#si';
$kategori='#<p class="post-categories"><span>Kategoriler:(.*?)</a></p>#si';
preg_match($baslik,$site,$baslikfonksiyon);
preg_match($icerik,$site,$icerikfonksiyon);
preg_match($kategori,$site,$kategorifonksiyon);
$baslikkullan=$baslikfonksiyon[1];
$icerikkullan=$icerikfonksiyon[1];
$kategorikullan=$kategorifonksiyon[1];
i see this error in error_log file :
[01-Mar-2017 20:39:41 UTC] PHP Parse error: syntax error, unexpected
'preg_match' (T_STRING) in /example/file/path on line 9
Can anyone explain to me why i get this error
Thanks.
I think you have problem with the regex. Try with:
$baslik = '^.*?<\/title>';

Php SQL syntax error [duplicate]

This question already has answers here:
PHP parse/syntax errors; and how to solve them
(20 answers)
Closed 6 years ago.
Whats wrong in following query???
am getting error
Parse error:
syntax error, unexpected 'INSERT' (T_STRING)
$NEW_TOKEN = mysql_query("INSERT INTO `iPhone_users` (`DEVICE_TOKEN`,`NAME`,`LOGIN_ID`,`CREATED_AT`) VALUES ('$DEVICE_TOKEN','$STUDENT_FIRST_NAME','$LOGIN_ID','$TODAY')");
You need to close either a single quote or double quote which started before the line you pasted. There is nothing wrong with the query itself.
The error you are getting is a PHP parse error.

Parse error: syntax error, unexpected ''aws_account.aws_account_id'' (T_CONSTANT_ENCAPSED_STRING) in project [duplicate]

This question already has answers here:
PHP parse/syntax errors; and how to solve them
(20 answers)
Closed 7 years ago.
I came across the following error, but I fail to see what is wrong:
Parse error: syntax error, unexpected ''aws_account.aws_account_id'' (T_CONSTANT_ENCAPSED_STRING) in C:\xampp\htdocs\laravel\awsconfig\app\controllers\CRUDController.php on line 11
my join statement where the error is being thrown:
$query = DB::table('ec2_instance')->join('aws_account', 'aws_account.id', '=', 'ec2_instance.id')->select('ec2_instance.instance_id', 'ec2_instance.public_dns_name', 'ec2_instance.key_name','ec2_instance.instance_type','ec2_instance.launch_time',‌​'aws_account.aws_account_id')->get();
You've got some junk characters there between the last , and ':

Categories