Save data of a select in the bdd

0
<legend><h3>FORMULARIO</h3></legend>
<form md="post" action="agregarDatos.php" name="formulario" id="formulario"  onSubmit="return limpiar()">
                <div>
                    <table>
                        <tr>
                            <td>Supervisor de turno</td>
                            <td>
                                <select type="text" id="supervisorTurno" name="supervisorTurno" class="inputs" required="true" >
                                    <option value="" disabled selected>Selecccionar</option>
                                    <option value="">A</option>
                                    <option value="">B</option>
                                    <option value="">C</option>
                                    <option value="">D</option>
                                    <option value="">E</option>                                     
                                    <option value="">F</option>
                                    <option value="">G</option>
                                </select>
                            </td>

                        </tr>

                        <tr>
                            <td>Fecha procedimiento</td>
                            <td><input  type="date" id="fecha" name="fecha" class="inputs" required="true"/></td>
                        </tr>

                        <tr>
                            <td>Hora procedimiento</td>
                            <td><input  type="time" id="hora" name="hora" class="inputs" required="true" /></td>
                        </tr>

                        <tr>
                            <td>Ingreso Llamada</td>
                            <td>
                                <select  type="text" id="ingresoLlamada" name="ingresoLlamada" class="inputs" required="true">
                                    <option value="" disabled selected>Seleccionar</option>
                                    <option value="">Línea 800</option>
                                    <option value="">WhatsApp</option>
                                    <option value="">Radio</option>
                                    <option value="">Celular</option>                                       
                                    <option value="">Terreno</option>
                                    <option value="">Línea 1426</option>
                                </select>
                            </td>
                        </tr>

                        <tr>
                            <td>Nombre Operador</td>
                            <td><input  type="text" id="nombreOperador" placeholder="Nombre y Apellido" name="nombreOperador" class="inputs" required="true"  onkeypress="return soloLetras(event)" maxlength="25" pattern=".{5,25}"  title="Debe escribir nombre y apellido"/></td>
                        </tr>

                        <tr>
                            <td>Tipo Procedimiento</td>
                            <td><input  type="text" id="tipoProcedimiento" name="tipoProcedimiento" class="inputs" required="true" maxlength="15"/></td>
                        </tr>

                        <tr>
                            <td>Lugar Procedimiento</td>
                            <td><input  type="text" id="lugarProcedimiento" name="lugarProcedimiento" class="inputs" required="true" maxlength="15"/></td>
                        </tr>

                        <tr>
                            <td>Móvil Concurre</td>
                            <td><input  type="text" id="movilConcurre" name="movilConcurre" class="inputs" required="true" maxlength="15"/></td>
                        </tr>   

                        <tr>
                            <td>A cargo Móvil</td>
                            <td><input  type="text" id="aCargoMovil" name="aCargoMovil" class="inputs" required="true" onkeypress="return soloLetras(event)" maxlength="15"/></td>
                        </tr>

                        <tr>
                            <td>Hora llegada al lugar</td>
                            <td><input  type="time" id="horaLlegada" name="horaLlegada" class="inputs" required="true" /></td>
                        </tr>

                        <tr>
                            <td>Hora Término</td>
                            <td><input  type="time" id="horaTermino" name="horaTermino" class="inputs" required="true" /></td>
                        </tr>

                        <tr>
                            <td>Nombre Víctima</td>
                            <td><input  type="text" id="nombreVictima" name="nombreVictima" class="inputs" required="true" placeholder="Nombre completo" onkeypress="return soloLetras(event)"  maxlength="25" pattern=".{5,50}"  title="Debe escribir nombre completo"/></td>
                        </tr>

                        <tr>
                            <td>Nombre Paramédico</td>
                            <td><input  type="text" id="nombreParamedico" name="nombreParamedico" class="inputs" required="true" placeholder="Nombre y Apellido" onkeypress="return soloLetras(event)"  maxlength="25" pattern=".{5,25}"  title="Debe escribir nombre y apellido"/></td>
                        </tr>

                        <tr>
                            <td>Vehículo de Emergencia concurre</td>
                            <td><input  type="text" id="vehiculoEmergenciaConcurre" name="vehiculoEmergenciaConcurre" class="inputs" required="true" maxlength="25"/></td>
                        </tr>

                        <tr>
                            <td>A cargo Vehículo</td>
                            <td><input  type="text" id="aCargoVehiculo" name="aCargoVehiculo" class="inputs" required="true" onkeypress="return soloLetras(event)" maxlength="25" placeholder="Persona a cargo"/></td>
                        </tr>

                        <tr>
                            <td>Resultado Procedimiento</td>
                            <td><input  type="text" id="resultadoProc" name="resultadoProc" class="inputs" required="true" maxlength="15"/></td>
                        </tr>

                        <table>
                            <tr>
                                <td><textarea required="true" id="informe" name="informe" maxlength="500" rows="10" cols="37" placeholder="Informe Paramédico" ></textarea></td>
                            </tr>
                        </table>

                            <input type="submit" onSubmit="" value="Guardar" name="opcion" style="float:left;margin-top: 6px;" />

                    </table>
                </div>


            </form>

Hi, I have the following problem, I hope you can help me. When saving the fields of a form, the field "called entry" is kept empty in the bdd.Me the same thing happens with several select fields.

    
asked by Cristobal 14.06.2018 в 18:55
source

2 answers

0

Hello friend in the value attribute of the options you need the value you have it empty value=""

    
answered by 14.06.2018 / 19:14
source
-2

save.php

                        alert ("If it was saved");                      ';             } else {                     '                         alert ("was not saved");                      ';             }         // We closed the connection with the database         mysqli_close ($ connection);     ? >     
answered by 14.06.2018 в 19:10