RSS Forums RSS

Get an html tags name or id attribute?

Thread Solved
Reply
Posts: 7
Reputation: bdicasa is an unknown quantity at this point 
Solved Threads: 0
bdicasa bdicasa is offline Offline
Newbie Poster

Get an html tags name or id attribute?

  #1  
Dec 30th, 2008
Hello all,

I looked around with google for a while and couldn't find an answer to my question.

I'm trying to use php to get the name (or ID) of an html tag. I need to do this because I am creating a shopping cart which has a checkbox beside each item in the shopping cart. If the checkbox is checked and they hit the 'Remove' button, all items with a check are removed from the session variable. I was rendering the checkboxes to have a name of the ID of the product from the database. If the check box is checked I wanted to retrieve the name or ID of the check box so I could remove the proper item from the session variable I created.

If any one could lead me in the right direction on how to do this I would greatly appreciate it. Thanks.
AddThis Social Bookmark Button
Reply With Quote  
Posts: 7
Reputation: bdicasa is an unknown quantity at this point 
Solved Threads: 0
bdicasa bdicasa is offline Offline
Newbie Poster

Re: Get an html tags name or id attribute?

  #2  
Dec 30th, 2008
Well not sure what I was thinking but I figured out how to solve my problem by looping through the $_POST array and checking to see if the $key exists.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.



Similar Threads
Other Threads in the PHP Forum
Views: 673 | Replies: 1 | Currently Viewing: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 1:59 pm.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC