mercredi 1 juin 2016

Store checkbox values in PHP Sessions

I have to program an internet site that includes a login. That I did already and it work well. After you logged in I set 4 HTML buttons for 4 different categories (nature, persons, objects, symbols). If you click on one of the 4 buttons there appears a table with Whatsapp Emojis and beside them a checkbox. The images of the WhatsApp Emojis are local stored. The Path of these Emojis are in a SQL Database. The number of the picture is also in the Database stored. The number of the picture is also the name of the checkbox. That means Emoji 1 has the checkbox 1, Emoji 2 the checkbox 2 and so on. And if you click to another category the picture number continues from the last number of the last Emoji from the last category.

This all works fine. Now to my Problem.

For example: If you check a checkbox in the category "nature" and you click to another category and after that you click back to "nature" the checked checkbox isn't checked anymore.

My idea: Save the checkbox in the session. I know how it works, but in this case it absolutely does not work because I have 4 different categories and I cant save the checked checkbox in the Session.

I have for every category another script! And the buttons lead to this script!




Aucun commentaire:

Enregistrer un commentaire