maxves1 Posted April 6, 2010 Share Posted April 6, 2010 hello, I have my php dynamic drop down menu at : http://faculty.poly.edu/~yjeanpie/searchcat.php As you can see, when you select a category and product, it displays the selected stuff on the other page, but that is not exactly what i wanna do, I want it to retrieve all other attributes related to the selection, from the database, suppose I have selected software and photoshop ( from my PRODUCTS table in database) I want it to display those plus all other attributes related to photoshop say tutorial links, id ,description ,etc, see the following for a brief idea: http://faculty.poly.edu/~yjeanpie/generalinfo.php so i need all those attributes to be pulled from database as soon as i select these 2 things from drop down, i used the following print_r command on the results page, but its not working, can anyone help me fix it or rewrite it?> <?php print_r($_POST); ?> <?php require("db_connect.php"); /*$query = mysql_query("SELECT * FROM products NATURAL JOIN category WHERE prod_name='".$_POST['subcat']."'"); echo '<pre>'; print_r($row = mysql_fetch_assoc($query)); //echo .$row['prod_info'].; echo '</pre>'; */ print_r($_SESSION); //while ($row = mysql_fetch_assoc($query)) { foreach ($row as $col=>$val) { if (!empty($val)) { echo 'col: '.$col.' val: '.$val.'<br />'; } } echo '<br />'; //} ?> </body> </html> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.