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')
Related
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.
This question already has answers here:
PHP parse/syntax errors; and how to solve them
(20 answers)
Closed 5 years ago.
this is my first queston i ask, its about this code:
<?php
date_default_timezone_set('America/Santiago);
$fecha=date('Y-m-d');
$hora=date('H:i:s');
$link=mysqli_connect('localhost','root','','evaluacion2');
$sql="INSERT INTO sensores SET temperatura=".$_GET['celsius'].",distancia=".
$_GET['distancia'].",fecha='".$fecha."',hora='".$hora."'";
mysqli_query($link,$sql);
?>
i try to insert from the URL
http://localhost/sensores/capturadatos.php?temperatura=3&distancia=12
but i get this message
Parse error: syntax error, unexpected 'Y' (T_STRING) in D:\wamp64\www\sensores\capturadatos.php on line 3
Replace date_default_timezone_set('America/Santiago);
to date_default_timezone_set('America/Santiago');
This question already has answers here:
PHP parse/syntax errors; and how to solve them
(20 answers)
Closed 6 years ago.
I'm quite new to PHP. I have created an array which I have included however when I need to echo a url which is in my settings array it just gives me the following error:
Parse error: syntax error, unexpected 'templateurl' (T_STRING) in C:\xampp\htdocs\index.php on line 15
Thanks for your help and time in advance.
Try this:
<?php include('hi.php'); echo $settings['templateurl'];?>
You need to include the file first and then you are able to retrieve the data from it.
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.
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