PHP: Getting values from URL is not working

Jangga

Junior Member
Joined
Aug 8, 2016
Messages
196
Reaction score
11
Hello bosses, please I need your assistance. I'm trying to get details from users URL. It's not working. I'm getting error as unexpected T_variable

Users URL looks like : http://www.mysite.com/user/[email protected]&pin=H5Dhs8Ruotsl

My code is:
<?
if(isset($_GET['email']) AND isset($_GET['pin'])){

$email=$_GET['email'];
$pin=$_GET['pin'];

//my db code goes here

?>

The error occurs at the line having $email=$_GET['email'];

I don't know what is wrong.... Pls say something
 
At the beginning try writting <?php instead of just <?
 
Try formatting your code nicely, changing <? to <?php, and I also see a missing } bracket.
 
Try formatting your code nicely, changing <? to <?php, and I also see a missing } bracket.
Yes, I ommited the bracket on pasting here since it wasn't relevant to the error. Or is it?
 
There's nothing wrong in that piece of code then, we need to see the rest so we can help you.
 
I cant post full code here, why?
 
U are the bomb waiting to explode! Problem solved!! Indians are good. I'm having my study in your country soon. Thanks man

welcome bro!
let me know if you need any further help
 
Back
Top