Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>cuestionario
- </title>
- <link type="text/css" rel="Stylesheet" href="js/jquery.validity.css" />
- <script type="text/javascript" src="js/jquery-1.6.4.min.js"></script>
- <script type="text/javascript" src="js/jquery.validity.min.js"></script>
- <script type="text/javascript">
- $(function() {
- $("form").validity(function() {
- $("#organizacion")
- .require();
- });
- });
- </script>
- </head>
- <body>
- <br>
- <div id="contenido_principal">
- <?PHP
- if ($_POST) {
- $_TodoOK=1;
- if ($_POST['organizacion']) {$_organizacion = $_POST['organizacion'];} else {$_TodoOK=0;}
- $_dirIP = $_SERVER [ 'REMOTE_ADDR' ];
- $sql = "INSERT INTO almacencuestionarios(FechaCumplimentacion , Organizacion1 , IP)
- VALUES (NOW() , $_organizacion , '$_dirIP')";
- echo $sql ;
- } else {
- ?>
- <form ACTION="" METHOD=POST>
- <table class="cuestionario" width="750" border="1" cellspacing="1">
- <tr>
- <th scope="col" width="650"></th>
- <th scope="col">1</th>
- <th scope="col">2</th>
- <th scope="col">3</th>
- <th scope="col">4</th>
- </tr>
- <tr>
- <td><div align="right">Aquí pongo la pregunta</div></td>
- <td><input type="radio" name="organizacion" value="1" id="organizacion" class="required" /></td>
- <td><input type="radio" name="organizacion" value="2" id="organizacion" /></td>
- <td><input type="radio" name="organizacion" value="3" id="organizacion" /></td>
- <td><input type="radio" name="organizacion" value="4" id="organizacion" /></td>
- </tr>
- </table><br>
- <INPUT TYPE="hidden" name="DireccionIP" value="
- <?PHP
- echo $_SERVER [ 'REMOTE_ADDR' ];
- ?>">
- <input type='submit' value='Enviar datos' name='enviar' />
- <input name="reset" value="Borrar datos" type="reset">
- <?PHP
- }
- ?>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement