how to insert multiple checkbox values in database using php

Recommended Answers

SHow your code and your DB table

Jump to Post

All 2 Replies

Member Avatar

SHow your code and your DB table

Declare an array [] in all name of your html code and use them as array in php code.
Example

<input type="checkbox" name="month[]" value="January">January<br>
<input type="checkbox" name="month[]" value="February">February<br> ...

in your php code $_POST['month'] is array.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.