multiple categorie checkboxes

Results 1 to 2 of 2

Thread: multiple categorie checkboxes

  1. #1
    Join Date
    Dec 1969

    Default multiple categorie checkboxes

    Hi all<BR><BR>first of all lemmie say happy newyear to everyone<BR><BR>im trying to have a product that can be in multiple categories<BR><BR>eg<BR><BR>product1 is in the following categories<BR><BR>"kitchen,bathroom,houshold,dixon s"<BR><BR>these categories will be inserted into the db as a string and will be inserted<BR>via checkboxes.<BR><BR>the trick comes when i want to edit the product details<BR><BR>does anyone know how to check the string and if found then mark the checkbox as "on".<BR><BR>i thought about splitting the string into an array but i still cant get<BR>it to check the checkboxes.<BR><BR>does anyone know how to do this.<BR>or is there another method that i could use..<BR><BR>thanks in advance...<BR><BR>regards<BR><BR>stewart <BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: multiple categorie checkboxes

    Hi,<BR> Before inserting into db, you concat the categories(i.e value of the checkbox) with some sign(like *) and then insert into the db. When u r retreiving the value from the database you split the value for a perticular sign and trim that array of value then compare the value with the checkbox and make it on.<BR><BR>Gowda.<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts