943,577 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Marked Solved
  • Views: 1886
  • PHP RSS
Dec 30th, 2008
0

Get an html tags name or id attribute?

Expand Post »
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.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
bdicasa is offline Offline
7 posts
since Sep 2008
Dec 30th, 2008
0

Re: Get an html tags name or id attribute?

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.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
bdicasa is offline Offline
7 posts
since Sep 2008

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: select option problem??
Next Thread in PHP Forum Timeline: HELP: Undefined variable





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC