Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- form.html:
- <html>
- <body>
- <form action="submit.php" method="post">
- <input type="text" name="email">
- <input type="sumbit" value="Go">
- </form>
- </body>
- </html>
- submit.php:
- <?php
- // connect
- $email = $_POST['email'];
- $email = mysql_real_escape_string($email);
- mysql_query("INSERT INTO emails (email) VALUES ('$email')";
- ?>
- ======================================================
- look
- me or you at the insert try:
- VALUES ({'$email'})
- or
- VALUES ({$email})
- or
- VALUES ('{$email}')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement