Advertisement
Guest User

Untitled

a guest
Feb 13th, 2016
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.58 KB | None | 0 0
  1. <form class="form-horizontal" action="chk-gerente.php?nro_pergunta=<?php echo $nro_pergunta; ?>" method="GET">
  2. <fieldset>
  3. <legend><b>Pergunta <?php echo"$ordem";?> de <?php echo"$totalpergunta";?></b></legend>
  4. <div class="form-group">
  5. <center><h3><label><?php echo"$descpergunta";?></label></h3></center>
  6. <div class="col-lg-10">
  7. <div class="radio"><label><input type="radio" name="resp" id="optionsRadios1" value="5">OTIMO </label></div>
  8. <div class="radio"><label><input type="radio" name="resp" id="optionsRadios2" value="3">REGULAR </label></div>
  9. <div class="radio"><label><input type="radio" name="resp" id="optionsRadios3" value="1">RUIM </label></div>
  10. <div class="radio"><label><input type="radio" name="resp" id="optionsRadios4" value="0">NAO APLICADO </label></div>
  11. </div>
  12. </div>
  13. <?php
  14. $timestamp = @mktime(date("H")-4, date("i"),date("s"),date("m"),date("d"),date("Y"),0);
  15. $DataCad = gmdate("Y-m-d", $timestamp); // Gravar $DataCad no BD
  16. echo"<input type='hidden' name='loja' id='loja' value='$loja'>";
  17. echo"<input type='hidden' name='id_usuario' id='id_usuario' value='$id_usuario'>";
  18. echo"<input type='hidden' name='questionario' id='questionario' value='$questionario'>";
  19. echo"<input type='hidden' name='area' id='area' value='$area'>";
  20. echo"<input type='hidden' name='nro_pergunta' id='nro_pergunta' value='$nro_pergunta'>";
  21. echo"<input type='hidden' name='DataCad' id='DataCad' value='$DataCad'>";
  22. echo"<input type='hidden' name='pergunta' id='pergunta' value='$idpergunta'>";
  23. ?>
  24. <div class="form-group">
  25. <div class="col-lg-10 col-lg-offset-2">
  26. <button id='button' type="submit" class="btn btn-primary">Responder</button>
  27. </div>
  28. </div>
  29. </fieldset>
  30. </form>
  31.  
  32. require("conexao.php");
  33.  
  34. if(isset($_GET['submit'])){
  35. $loja = $_GET ["loja"];
  36. $id_ususario = $_GET ["id_usuario"];
  37. $questionario = $_GET ["questionario"];
  38. $area = $_GET ["area"];
  39. $idpergunta = $_GET ["pergunta"];
  40. $resp = $_GET ["resp"];
  41. $datacad = $_GET ["DataCad"];
  42.  
  43. $sql_insert = mysql_query("INSERT INTO respostas
  44. (resp_id,resp_loja,resp_usuario,resp_questionario,resp_area,resp_subgrupo,resp_pergunta_id,resp_resposta,resp_data,resp_status)
  45. VALUES
  46. ('','$loja','$id_usuario','$questionario','$area','1','$idpergunta','$resp','$DataCad','1')")
  47. or die (mysql_error());
  48. @mysql_query($sql_insert,$conexao);
  49. } else {
  50.  
  51.  
  52. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement