daily pastebin goal
72%
SHARE
TWEET

Untitled

a guest Feb 28th, 2014 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <form action="script.php" method="post">
  2. <input type="text" name="jmeno">
  3. <input type="submit" name="submit" value="Odeslat">
  4.  
  5. </form>
  6.  
  7. // script.php
  8.  
  9. <?PHP
  10.  
  11. if (isset($_POST['submit']) && $_POST['submit']=="Odeslat")
  12. {
  13.   $pripojeni = mysql_connect("localhost","root","lamalama","databases");
  14.   mysql_query("INSERT INTO test (jmeno) VALUES ('".mysql_real_escape_string($_GET["jmeno"])."')",$pripojeni);
  15.   mysql_close($pripojeni);
  16. }
  17.  
  18. ?>
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
 
Top