lebexpress Posted July 12, 2008 Share Posted July 12, 2008 Is there a way to have a value returned if I click on one of the rows(category) I have in my navigation bar? I am trying to get "1" from the first category(cell/row) when clicked on it, and 2 from the second category, etc.. I want them to be returned to a file called display_category_content.php , where I have all the mysql code ready, but I just can't get the value of the category returned. ex: <tr> <td><a href="display_prod_cat.php">Computers & Networking</a> </td> </tr> That's the cell that it has to return a value when clicked on it. Your help is appreciated! Quote Link to comment https://forums.phpfreaks.com/topic/114378-phpmysql/ Share on other sites More sharing options...
.josh Posted July 12, 2008 Share Posted July 12, 2008 You're going to have to post relevant code. A couple lines of html doesn't really help us out. Also, what have you tried? Did you get any error messages? Not understanding the process itself, or what functions to use? We aren't psychic. http://www.phpfreaks.com/tutorial/php-basic-database-handling Quote Link to comment https://forums.phpfreaks.com/topic/114378-phpmysql/#findComment-588158 Share on other sites More sharing options...
lebexpress Posted July 12, 2008 Author Share Posted July 12, 2008 I am sorry, I am new here, and I did not know that this site offers this great service and fast replies, that's why I wasn't very specific but I am going to be more specific this time. In my home page, I have a navigation bar with different cateogries (computer, mp3 players, TVs, etcc... ) and and I want to have a unique value to each one of them (ex: Computer has a value 1, MP3 Players have a value 2, 3, 4, 5, etc..) These categories are stacked in a table as below: <tr> <td><a href="display_prod_cat.php">Computers & Networking</a> </td> <! how can i have a value for this cell?? --> </tr> <tr> <td><a href="display_prod_cat.php">Mp3 Players & Accessories</a> </td> </tr> I need a function, or anything that if someone clicks on any of the category to return(send) it's value to "display_prod_cat.php" , where this file (display_prod_cat.php) will take that value and show the database available based on that unique value. I hope that made it a little more understandable? Again, thank you very much for the prompt response. Quote Link to comment https://forums.phpfreaks.com/topic/114378-phpmysql/#findComment-588170 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.