Re: Username
| From: | Robert Weeks | Date: | Tue, 05 Feb 2002 16:09:29 +0000 |
| Subject: | Re: Username | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-16534@lists.php.net to get a copy of this message | ||
If you read to part 2 of the tutorial it has quite a bit on inserting data.
The reason there are tutorials and books are to teach the *concepts* behind
what they are showing you.
This is probably what is tripping you up; you create the table with uid as
an integer, auto increment, not null field, then your insert statement tries
to insert "NULL" into that field.
You need to change this:
$query = "INSERT INTO users (uid, name) VALUES(NULL, $name)";
To this:
$query = "INSERT INTO users (name) VALUES ($name)";
Robert
On 2/5/02 10:46 AM, "Jennifer Downey" <jendowney@attbi.com> wrote:
> I am not getting an error message. The te.php is connecting to the data
> base. Just not doing what I want
> it to.
>
> While that is a very good tutorial (if I was just logging in) but it has
> nothing to do with inserting information
> into the database via a form.
>
> But thanks for the tut. It will come in handy when I get to that point in my
> learning stage.
> Jen