Quantcast
Channel: Active questions tagged html - Stack Overflow
Viewing all articles
Browse latest Browse all 67469

Insert value checkbox in database. Unchecked=0 checked=1

$
0
0

I'm trying to get a value of a checkbox in the database. If the box is checked, the value is 1 If the box is unchecked, the value is 0.

In my index page my table looks like:

<td style="width: 100px" class="auto-style1"><input type="checkbox" name="ele3" id="rallydag" 
value="1"></td>

And in my page, what will put it in my database, i have:

$ele3 = mysqli_real_escape_string($link, $_REQUEST['ele3']);

So i have for every day in the week a different checkbox, people can tell us if they can come that day.

Now every post in my database returns at "1". What do i wrong? I searched a lot, but all doesn't work.


Viewing all articles
Browse latest Browse all 67469

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>