On my first page I have created dynamic link this way:
do
{
$FilterModule = $row_mysql['Module']; /* Say it's value is 'xyz' for particular case */
echo "<a href='filterquery.php?filter=$FilterModule'>$FilterModule</a>";
} while($row = mysql_fetch_array($QueryResult));
Now when i click on above link from the first page, it takes me to a second page with url: filterquery.php?filter=xyz
. On this page I am using $FilterModule = $_GET['FilterModule'];
to get the value(='xyz'
). But I get an error:
'Undefined index: FilterModule'.
Not sure what mistake i am making? Please help..
You should be using
$_GET['filter'];
because thats what you called the parameter in the URL.