RE: [PHP] Write from form to DB
| From: | Jay Blanchard | Date: | Wed, 03 Aug 2005 17:59:55 +0000 |
| Subject: | RE: [PHP] Write from form to DB | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-219925@lists.php.net to get a copy of this message | ||
[snip]
>[snip]
>$query = "INSERT INTO user (name,password) VALUES
>($username","$password")
>
>would do the job but, it dosent. It gives a
>
>Parse error: syntax error, unexpected T_VARIABLE in C:\Program
>Files\Apache Group\Apache2\htdocs\php\login\registration_action.php on
>line 15
>[/snip]
>
>$query = "INSERT INTO user (name,password) VALUES
>("'.$username.'","'.$password.'") ";
>
>Try that... should work. your query syntax is mangled.
>
>
>
Nope, now it gives this
*Parse error*: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in
*C:\Program Files\Apache
Group\Apache2\htdocs\php\login\registration_action.php* on line *15*
[/snip]
Add a semi-colon at the end of your $result line. And alweays hit
reply-all.