Re: Submitting info from a form to a db
| From: | Niklas Lampén | Date: | Wed, 15 Sep 2004 07:22:30 +0000 |
| Subject: | Re: Submitting info from a form to a db | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-196704@lists.php.net to get a copy of this message | ||
First:
Post the error code when you get one.
Second:
Split the code into pieces/rows to find errors.
-- CODE --
<?
mysql_query("
INSERT INTO
users
(
fullname,
email,
username,
password
) VALUES (
'" . $_POST['fullname'] . "',
'" . $_POST['email'] . "',
'" . $_POST['username'] . "',
'" . md5($_POST['password'] . "'
)
");
?>
-- END --
Easier to spot the error? md5() tag is not closed.
Niklas
Logan Moore wrote:
heres the code, but im getting an error
<? mysql_query("INSERT INTO users(fullname, email, username, password)
VALUES ('".$_POST['fullname']."', '".$_POST['email']."',
'".$_POST['username']."', '".md5($_POST['password']."')");
?>
This time I dont have a clue whats happening