i am getting value from url, URL is like below
http://*****/test.php?register=true$gcm_regid=Amit&name=amit.sid@gmail.com&email=asdxcvxcvxzcvxc
and i am printing that value by below code
$gcm_regid = $_GET["gcm_regid"];
$name = $_GET["name"]
$email = $_GET["email"]
echo $name; ======>this is line 14-<==========
but i am getting error like
Parse error: syntax error, unexpected T_VARIABLE in /******/test.php on line 14
Simply enough, you're missing semicolons after the $name
and $email
lines.
You are missing the semicola ;
after $_GET["name"]
and $_GET["email]
$gcm_regid = $_GET["gcm_regid"];
$name = $_GET["name"];
$email = $_GET["email"];
echo $name;
Your missing semicolons. and
http://*****/test.php?register=true$gcm_regid=Amit&name=amit.sid@gmail.com&email=asdxcvxcvxzcvxc
In this link you are using $
symbol instead of &
. change $gcm_regid
to &gcm_regid
Simply, There are two Problems, 1st one, you are missing semicolons,
$name = $_GET["name"]
$email = $_GET["email"]
& 2nd one, problem is in url passing elements,
http://*****/test.php?register=true$gcm_regid=Amit&name=amit.sid@gmail.com&email=asdxcvxcvxzcvxc
Change this line to this,
http://*****/test.php?register=true&gcm_regid=Amit&name=amit.sid@gmail.com&email=asdxcvxcvxzcvxc
The mistake is "true$gcm_regid", it will come as "true&gcm_regid"