Topic awaiting preservation: User Authenticating PHP/MySQL (Page 1 of 1) |
|
---|---|
Obsessive-Compulsive (I) Inmate From: |
posted 03-24-2002 00:10
Hey, I'm new here and I got this code that I'm trying to get to work to make a members section on my website. But I can't get it to work. It will never connect to the database which is MySQL. Heres the code if anyone can help that'd be great. code: <?php // accesscontrol.php
code: <?php // common.php
code: <?php // signup.php
code: <?php include("accesscontrol.php"); ?>
code: <?php // db.php
|
Paranoid (IV) Inmate From: New Jersey, USA |
posted 03-24-2002 00:23
What kind of error messages are you getting? And, are you sure your $dbuser and $dbpass in db.php are correct? |
Obsessive-Compulsive (I) Inmate From: |
posted 03-24-2002 01:56
I get the error "A database error has occurred. If this problem persists blahblahblah" And there is no user id or password in the database yet. I'm just trying to get it to work with the signup part I haven't gotten that far yet. If thats not what you mean please clarify. Thanks for the help. |
Obsessive-Compulsive (I) Inmate From: |
posted 03-28-2002 01:40
Sorry I didn't understand exactly what you meant, I used root for the dbuser and left dbpass blank. Hope you can help. |
Obsessive-Compulsive (I) Inmate From: |
posted 04-02-2002 15:02
btw i have administrative access to mysql so i am able to use root for other things, so it should work |
Paranoid (IV) Mad Scientist From: Omicron Persei 8 |
posted 04-02-2002 15:23
hmmm |
Nervous Wreck (II) Inmate From: |
posted 04-02-2002 20:21
Hi, I am wondering where your PASSWORD() function is from? is it a custom function, it didn't show up when i searched the php.net docs. |
Bipolar (III) Inmate From: London, UK |
posted 04-11-2002 16:23
PASSWORD() is an sql function that creates a hash of the password - you should find it in the mysql documentation. |
Paranoid (IV) Inmate From: Harrow, Ontario, Canada |
posted 04-11-2002 16:33
First of all, I don't see a definition of Dbconnect in that list there, yet you call it first, then start sending the database messages. |
Bipolar (III) Inmate From: London, UK |
posted 04-11-2002 16:39
Nah - you can use functions to open connections - I use an include'd function library all the time just to save typing the user and passwd so often (I'm lazy, so what?) |
Obsessive-Compulsive (I) Inmate From: |
posted 04-17-2002 05:38
Ok thanks for all your help! It led me to my conclusion "Take all the info I got here and recode some of it!" hehe just the db.php and this is what I came up with: code: <?php // db.php
|