不完整的PHP网站

不完整的PHP网站,php,jquery,html,Php,Jquery,Html,我的表单有问题,当我使用Xampp进入我的网站时,网页没有完成,没有出现“区域”组合框、“fono”文本字段和按钮,我不知道为什么会发生这种情况:(我想知道是否有人能帮我解决这个问题,因为我解决了支架问题,现在这个问题真的吓坏了我 <!DOCTYPE html> <html> <head> <title>Formulario de datos</title>

我的表单有问题,当我使用Xampp进入我的网站时,网页没有完成,没有出现“区域”组合框、“fono”文本字段和按钮,我不知道为什么会发生这种情况:(我想知道是否有人能帮我解决这个问题,因为我解决了支架问题,现在这个问题真的吓坏了我

 <!DOCTYPE html>
    <html>
        <head>
            <title>Formulario de datos</title>
                    <meta charset="UTF-8">
                <script src="js/jquery.js"></script>    
            <script src="js/NumeroLetra.js"></script>   
            <script src="js/Hora.js"></script>
            <script src="js/jquery-ui.js"></script>
            <script src="js/jquery.Rut.js"></script>
            <script src="js/jquery.validate.js"></script>
        </head>




        <body onLoad="IniciarReloj24()">

            <?php 
                ini_set('error_reporting',0);
                include ('funciones.php');
            ?>
            <form action = " " method="post">
                <?php 
                    //comprobamos el evento del boton
                    if ($_POST['btnRutBuscar'] == "Buscar"){
                        $cnn = Conectar();
                        //concatenamos los inputs para realizar el formato del rut
                        $rutt = $_POST['txtRut']."-".$_POST['txtDigito'];
                        //sentencia sql anidada entre registro y regiones
                        $sql = "select re.rut, re.nombres, re.apellidos, re.fnac, re.sexo, r.id, r.region, re.fono from registro re, regiones r where (re.region = r.id) and (re.rut = '$rutt')";
                        $rs = mysqli_query($cnn, $sql);
                        while ($row = mysqli_fetch_array($rs)){
                            $rut = $row['rut'];
                            $nom = $row['nombres'];
                            $ape = $row['apellidos'];
                            $fna = $row['fnac'];
                            $sex = $row['sexo'];
                            //recogemos el id de la tabla regiones que sera utilizada en el combo box de regiones
                            $id = $row['id'];
                            $reg = $row['region'];
                            $fon = $row['fono'];
                            //se les añade los value a los inputs para poder recibir los valores de la base de datos
                        }
                    }

                 ?>





                <center><h1>Formulario de datos: todo en uno</h1></center>
                <center><h2>Creado por Matías Cáceres y Francisco Tello</h2></center>

                <br>
                <br>

                <div align="center"><label>Rut:</label>

                <input type="text" name="txtRut" id="txtRut" onkeypress="ValidaSoloNumeros()" value="<?php echo $rut?>" /> - 
                <input type="text" name="txtDigito" id="Verificador" size="2" onkeypress="ValidaSoloNumeros()" />
                <input type="submit"  name="btnRutBuscar" id="btnBuscar" value="Buscar" /></div>

                <br>
                <br>

                <div align="center"><label>Nombres:</label>
                <input type="text" name="txtNombres" id="txtNombres" onkeypress="txNombres()" value="<?php echo $nom ?>" />

                <br>
                <br>

                <div align="center"> <label>Apellidos:</label>
                <input type="text" name="txtApellidos" id="txtApellidos" onkeypress="txNombres()" value="<?php echo $ape ?>"/>

                <br>
                <br>

                <div align="center"><label>Fecha de Naciemiento:</label>
                <input type="date" name="txtFecha" value="<?php echo $fnac ?>" />

                <br>
                <br>

                <div align="center"><label>Sexo:</label>
                    <select name="txtSexo">
                    <option value=""><?php $sex ?></option>
                    <option value = "Masculino">Masculino</option>
                    <option value = "Femenino">Femenino</option>
                </select></div>

                <br>
                <br>

                <div align="center"><label>Región:</label>
                    <?php
                        $cnn=Conectar();
                        $sql="select region from regiones";
                        $rs = mysqli_query($cnn,$sql); ?>
                        <select name="txtRegion">
                            <option value=""><?php echo $reg ?></option>
                        <?php while ($row=mysqli_fetch_array($rs))
                        {echo '<option>'.$row["region"];} 
                        ?>
                        </select>
                    </div>

                <br>
                <br>

                <div align="center"><label>Fono:</label>
                <input type="text" name="txtFono" id="txtFono" onkeypress="ValidaSoloNumeros()" value="<?php echo $fon ?>" />
            </div>

                <br>
                <br>

                <table>
                    <td><input type="submit"  name="btnAgregar" id="btnAgregar" value="Agregar"/></div></td>
                    <td><input type="submit"  name="btnModificar" id="btnModificar" value="Modificar"/></div></td>
                    <td><input type="submit"  name="btnEliminar" id="btnEliminar" value="Eliminar"/></div></td>
                    <td><input type="submit"  name="btnVerTodos" id="btnVerTodos" value="Ver Todos"/></div></td>
                </table>





                <?php
                    if($_POST['btnAgregar']=="Agregar")
                    {
                        $cnn = Conectar();
                        $rutt = $_POST['txtRut']."-".$_POST['txtDigito'];
                        $nom = $_POST['txtNombres'];
                        $ape = $_POST['txtApellidos'];
                        $fna = $_POST['txtFecha'];
                        $sexo = $_POST['txtSexo'];
                        $reg = $_POST['txtRegion'];
                        $fon = $_POST['txtFono'];
                        $sql = "insert into registro values('$rutt','$nom','$ape','$fna','$sexo','$reg','$fon')";
                        //este if lo acabo de colocar, es mas que nada para saber si ocurrio algo malo al momento de ejecutar la funcion (***** El if es necesario en todos los botones*****)

                        #Comprobar el nombre de las variables
                        if (empty($rut) || empty($nom) || empty($ape) || empty($fnac) || empty($sex) || empty($reg) || empty($fon)) {
                            echo "<script>alert('Todos los campos son obligatorios');</script>";
                            if( mysqli_query($cnn,$sql)){
                                echo "<script>alert('Se han grabado los datos')</script>";
                                echo "<script>window.location='index.php'</script>";
                        }else{
                            echo "<script>alert('ocurrio un problema');</script>";
                                }
                            }
                        }


                    if($_POST['btnEliminar']=="Eliminar")
                    {
                        $cnn = Conectar();
                        $rut = $_POST['txtRut']."-".$_POST['txtDigito'];//es necesario concadenar los dos inputs para que funcione la consulta
                        $sql = "delete from registro where (rut = '$rut')";
                        mysqli_query($cnn,$sql);
                        echo "<script>alert('Se eliminó el registro')</script>";
                    }

                    if($_POST['btnModificar']=="Modificar")
                    {
                        $cnn = Conectar();
                        $rutt = $_POST['txtRut']."-".$_POST['txtDigito']; //es necesario concadenar los dos inputs para que funcione la consulta
                        $nom = $_POST['txtNombres'];
                        $ape = $_POST['txtApellidos'];
                        $fna = $_POST['txtFecha'];
                        $sex = $_POST['txtSexo'];
                        $reg = $_POST['txtRegion'];
                        $fon = $_POST['txtFecha'];
                        $sql = "update registro set nombres='$nom', apellidos='$ape', fnac='$fna', sexo='$sex', region='$reg', fono='$fon' where rut='$rutt'";
                        mysqli_query($cnn,$sql);
                        echo "<script>alert('Se han editado los datos')</script>";
                    }
                ?>





            </form>
            <table border = '1'>
                <tr>
                <?php date_default_timezone_set('America/Santiago');
                $vaFecha = date('d-m-y');
                ?>
                <td>Fecha</td>
                <td><input type = "text" name="caja_fecha" value = "<?php echo $vaFecha; ?>" disabled="disabled"></td>
                </tr>
            </table>
            <form name="reloj24">  
                <input type="text" size="8" name="digitos" value=" " disabled="disabled">
            </form>  
            <script>
                        $('#txtRut').Rut( {
                    digito_verificador: '#Verificador',
                    on_error: function(){ alert('Rut incorrecto'); 
                    $("#txtRut").val("");
                    $("#Verificador").val("");
                  }
                } );
            </script>
        </body>
    </html>

达托斯公式

尝试调试问题时为什么不显示错误报告?删除
ini\u集(“错误报告”,0);
并添加
ini\u集(“显示错误”,“打开”);错误报告(全部);
在页面顶部。您可以在浏览器中看到错误消息。这将有助于识别问题。您收到了什么错误消息?按照他们的指示,然后返回此处,编辑您的帖子并添加您收到的错误消息。注意:未定义的索引:C:\xampp\htdocs\trabajo\index.php中的btnRutBuscar在第22行,但另一个文本为elds似乎并没有解决雪人的问题,我不得不删除这个:并替换为选项