<https://forums.phpfreaks.com/topic/165217-solved-help-needed-with-passing-id-through-url/page/2/#comment-871606>
<http://schema.org/text>
"This code works fine: \n  \n\n \n&lt;?php\n\nif(!isset($_GET['cat'])){\n   die(\"Category isn't specified\");\n}\n\n\n/* Enable displaying of errors */\nerror_reporting(E_ALL);\nini_set('display_errors', 'On');\n\n$cat = mysql_real_escape_string($_GET['cat']);\n\n$get_items = \"SELECT * FROM poj_products WHERE cat='$cat'\";\n$get_items = mysql_query($get_items);\nif($get_items){\n   $item_row = mysql_fetch_assoc($get_items);\n   extract($item_row);\n   echo &lt;&lt;&lt;HTML\n   &lt;a href=\"http://www.patternsofjoy.com/test2.php?item_desc=$id\"&gt;View details/order&lt;/a&gt;\nHTML;\n   #echo '&lt;a href=\"'.$sitelocation.$item_row['url'].'?item_desc='.$item_row['id'].'&gt;view details/order&lt;/a&gt;';\n   echo $_GET['cat'];\n}else{\n   die(\"Unable to connect to database.\".mysql_error());\n}\n\n?&gt;\n\n \n  \n\nBut when I pass the URL containing a pointer to the 'desc' in my DB to the next page (http://www.patternsofjoy.com/test2.php), nothing echoes?  I am pretty sure I have the code correct on the next page which is: \n  \n\n \n&lt;?php\n$item_desc = $_GET['item_desc'];\necho $item_row['desc'].'&lt;br/&gt;&lt;br/&gt;';\n?&gt;\n\n \n  \n\nI am getting the3 error: \n  \n\n \nNotice: Undefined variable: item_row in /homepages/27/d120150310/htdocs/poj/test2.php on line 46\n\n \n  \n\nLine 46 is: \n  \n\n \necho $item_row['desc'].'&lt;br/&gt;&lt;br/&gt;';\n\n \n  \n\nThank you! \n  \n"
<https://forums.phpfreaks.com/topic/165217-solved-help-needed-with-passing-id-through-url/page/2/?tab=comments#comment-871506>