how to insert multiple checkbox values in database using php

Recommended Answers

All 2 Replies

Member Avatar for diafol

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 developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.