I am having a strange issue that I think may be a syntax problem but I dont understand completely.
Here is my code:
I am requesting the page containing the above code passing the get parameters as follows: ../page.php?famType="M01"&geo="2"PHP Code:if(isset($_GET['famType']))
{
$famTypeStr = $famTypes[$_GET['famType']];
echo "<script>alert('famType: " . $_GET['famType'] . " | " . $famTypeStr . "')</script>"; //DEBUG
}
if(isset($_GET['geo']))
{
$subgeoStr = $_GET['geo'];
echo "<script>alert('geo: " . $_GET['geo'] . " | " . $famTypeStr . "')</script>"; //DEBUG
}
The alert box pops up for both if statements and it prints the contents of the get variables as desired, but both $famTypeStr and $subgeoStr are null.
Is there something wrong with the assignment syntax I'm using in these cases?


Reply With Quote
Bookmarks