I visit:
http://www.mydomain.com/test.php?loc=1
This should set $location to be 'VC' and print it out to the screen.
But when I do this, I get a zero '0' instead.
What am I doing wrong, why can't I set a string?
<?php
$loc = $_REQUEST['loc'] ;
if($loc == 1){
$location = 'VC';
echo 'yes';
}
else {
echo "ERROR - Wrong Location code presented";
}
echo 'Location: ' + $location;
?>
I started with:
<?php
$loc = $_REQUEST['loc'] ;
echo 'Location: ' + $loc;
?>
Where I would visit:
http://www.mydomain.com/test.php?loc=VC
and it would do what I want, but that didn't work.
I must be missing something obvious, but I can't see what. help!