Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: checkbox with php and MySQL (Read 1767 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

checkbox with php and MySQL

I have now been hamering my head against a wall for some days and bugged many ppl about this.
I have been working a little with php and mySQL now but checkboxes I just can't figure out.

This is what the code would look like if I did it as I would do text boxes and textareas:

<input type="checkbox" name="Permission" value="<?php echo $Permission ?>>

This however does not work.
If I manually put "checked" in the permission column in the SQL db ithe box is checked but then I can't uncheck it and have it saved.
I found that it reads it ok but it does not write "checked" or "" to the db as it should.

If anyone can help me with this I would be so very grateful.

Thanks and regards,
Jan.

 
SimplePortal 1.0.0 RC1 © 2008-2021