Re: [PHP-DB] Username

2002-02-05 Thread Robert Weeks

What exactly is the error message? Did you change config.php to use the name
of your database and your username  password?

I've found the articles at devshed to be helpful in the past. This
particular one has a pretty good explaination of setting up a user
authentication system:

http://www.devshed.com/Server_Side/PHP/TimeIsMoney/TimeIsMoney1/page1.html

Robert


On 2/5/02 9:50 AM, Jennifer Downey [EMAIL PROTECTED] wrote:

 All I want is to get the username into the database.
 As soon as test.php shows in browser, the Username, submit button and box ar
 e there but also
 it prints the There has been a problem. right off the bat. Now I know
 there are misprints in the book
 and I hope I was smart enough to catch them but maybe not. can someone
 please tell me what I have
 done wrong?
 
 Thanks for all your time.
 
 Jennifer Downey
 
 


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] Username

2002-02-05 Thread Jennifer Downey

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


Robert Weeks [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 What exactly is the error message? Did you change config.php to use the
name
 of your database and your username  password?

 I've found the articles at devshed to be helpful in the past. This
 particular one has a pretty good explaination of setting up a user
 authentication system:

 http://www.devshed.com/Server_Side/PHP/TimeIsMoney/TimeIsMoney1/page1.html

 Robert


 On 2/5/02 9:50 AM, Jennifer Downey [EMAIL PROTECTED] wrote:

  All I want is to get the username into the database.
  As soon as test.php shows in browser, the Username, submit button and
box ar
  e there but also
  it prints the There has been a problem. right off the bat. Now I know
  there are misprints in the book
  and I hope I was smart enough to catch them but maybe not. can someone
  please tell me what I have
  done wrong?
 
  Thanks for all your time.
 
  Jennifer Downey
 
 




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] Username

2002-02-05 Thread DL Neil

Jennifer,

You have a clear idea of what you want done by the script - as guided by the book.
However, do you have a clear idea of what the script is actually seeing - and 
therefore why it is doing what
it's doing?

When debugging, add a heap of ECHO statements to test pertinent values, eg before a 
branch/decision make sure
you KNOW what the value IS (cf what it 'should be').

When you do this, it is most likely that the error/omission will become clear.
=dn


 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


 Robert Weeks [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  What exactly is the error message? Did you change config.php to use the
 name
  of your database and your username  password?
 
  I've found the articles at devshed to be helpful in the past. This
  particular one has a pretty good explaination of setting up a user
  authentication system:
 
  http://www.devshed.com/Server_Side/PHP/TimeIsMoney/TimeIsMoney1/page1.html
 
  Robert
 
 
  On 2/5/02 9:50 AM, Jennifer Downey [EMAIL PROTECTED] wrote:
 
   All I want is to get the username into the database.
   As soon as test.php shows in browser, the Username, submit button and
 box ar
   e there but also
   it prints the There has been a problem. right off the bat. Now I know
   there are misprints in the book
   and I hope I was smart enough to catch them but maybe not. can someone
   please tell me what I have
   done wrong?
  
   Thanks for all your time.
  
   Jennifer Downey
  
  
 



 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] Username

2002-02-05 Thread Robert Weeks

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 [EMAIL PROTECTED] 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


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php