Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <form>
- <input type="check" name="option1" value="1">
- <input type="check" name="option2" value="1">
- <input type="check" name="option3" value="1">
- <input type="submit" name="submit" value="submit">
- </form>
- <?php
- if (ISSET($_POST['submit'])) {
- $option1 = (!EMPTY($_POST['option1'])) ? 1 : 0;
- $option2 = (!EMPTY($_POST['option2'])) ? 1 : 0;
- $option3 = (!EMPTY($_POST['option3'])) ? 1 : 0;
- }
- $query = "INSERT INTO table (option1, option2, option3) VALUES ($option1,$option2,$option3)";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement