This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Nov 12th, 2011  |  syntax: None  |  size: 0.49 KB  |  views: 30  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. form.html:
  2.  
  3. <html>
  4. <body>
  5. <form action="submit.php" method="post">
  6. <input type="text" name="email">
  7. <input type="sumbit" value="Go">
  8. </form>
  9. </body>
  10. </html>
  11.  
  12. submit.php:
  13.  
  14. <?php
  15. // connect
  16.  
  17. $email = $_POST['email'];
  18. $email = mysql_real_escape_string($email);
  19. mysql_query("INSERT INTO emails (email) VALUES ('$email')";
  20. ?>
  21.  
  22. ======================================================
  23. look
  24. me or you at the insert try:
  25. VALUES ({'$email'})
  26. or
  27. VALUES ({$email})
  28. or
  29. VALUES ('{$email}')
  30.  
clone this paste RAW Paste Data