I have validated it to send one or two or all three if the user checks the checkbox. My problem is I only receive one value even if the user checks all three.
This is is on laravel php framework, but I think it applies to all database logic.
This is MySQL data type
$table->string('category');
function restorative() {
var x = document.getElementById("restorative").required;
}
function esthetics() {
var x = document.getElementById("esthetics").required;
}
function implant() {
var x = document.getElementById("implant").required;
}
<input type="checkbox" name="category" value="Restorative" id="restorative" onclick="restorative()"><label for="">Restorative</label>
<br>
<input type="checkbox" name="category" value="Esthetics" id="esthetics" onclick="esthetics()"><label for="">Esthetics</label>
<br>
<input type="checkbox" name="category" value="Implants" id="implants" onclick="esthetics()"><label for="">Implants</label>
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire