SHARE
TWEET

Untitled

a guest Jun 18th, 2017 92 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. $db_host = "localhost";
  3. $db_user = "root";
  4. $db_pass = "";
  5. $db_name = "anketa";
  6. $pripojenie=MySQL_Connect($db_host,$db_user,$db_pass); // nadviazanie spojenia
  7. mysql_select_db ($db_name,$pripojenie); // výber databázy
  8.  
  9. //obsah
  10. echo "<table width='500px' align='center'><tr><td>";
  11. echo "<strong>Paci sa vam tato stranka?</strong><br />";
  12. echo "<form action='anketa.php?zapis' method='post'>";
  13. echo "<input type='radio' name='typ_hlasu' value='1'>Ano";
  14. echo "<input type='radio' name='typ_hlasu' value='2'>Nie";
  15. echo "<br /><input type='submit' value='Hlasovat'>";
  16. echo "</form>";
  17. echo "</td></tr></table>";
  18. if(isset($_GET['zapis'])) {
  19. mysql_query("INSERT INTO anketa () VALUES ()");
  20. header("location: anketa.php");
  21. }
  22. //koniec obsahu
  23.  
  24. MySQL_Close($pripojenie); // ukončenie spojenia
  25. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top