Advertisement
Guest User

Untitled

a guest
Nov 12th, 2011
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  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.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement