Advertisement
Guest User

Untitled

a guest
Feb 27th, 2014
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. // mysql
  2.  
  3. id INT 11 auto_increment
  4. jmeno VARCHAR 255
  5. datum DATETIME
  6.  
  7.  
  8. // index.php
  9.  
  10. <form name="input" action="script.php" method="get">
  11. <input type="text" name="jmeno">
  12. </form>
  13.  
  14. // script.php
  15.  
  16. <?PHP
  17. $jmeno = $_GET["jmeno"];
  18.  
  19. $pripojeni = mysql_connect("localhost","root","lamalama","databases");
  20. $akce = "INSERT INTO test (jmeno) VALUES ($jmeno)";
  21.  
  22. mysql_query($pripojeni,$akce)
  23. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement