Jump to content

Recommended Posts

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!

Link to comment
https://forums.phpfreaks.com/topic/114378-phpmysql/
Share on other sites

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

Link to comment
https://forums.phpfreaks.com/topic/114378-phpmysql/#findComment-588158
Share on other sites

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.

 

 

Link to comment
https://forums.phpfreaks.com/topic/114378-phpmysql/#findComment-588170
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.