Jump to content

MySQL and PHP just hate me. Help anyway, won't you?


Myrkr

Recommended Posts

So, I used the script provided at http://phpsense.com/php/php-login-script.html  .

 

After a great big argument with the darn thing, it seems to REFUSE to let me to log in with the account I created, named blah.

 

My table has the following:

 

id - INT - 11 - not null - auto increment - primary key

firstname - VARCHAR - 50 - not null

last name - VARCHAR - 30 - not null

passwd - CHAR - 20 - not null - index

cpassword - VARCHAR - 20 - not null

 

To answer your questions...

 

... yes, I have NO idea what I'm doing, but I learn best from trial, error, and help.

 

So. Whenever I check what the password is, in the database, instead of it being "blah" like it's SUPPOSED to, be, it's a random string of letters and numbers.

 

For the register-exec.php script provided by said third party, there is a query that goes something along the lines of:

 

$qry = "INSERT INTO members(firstname, lastname, login, passwd) VALUES('$fname','$lname','$login','".md5($_POST['password'])."')";

$result = mysql_query($qry);

//Check whether the query was successful or not

if($result) {

header("location: register-success.php");

exit();

}else {

die("Query failed");

}

 

I have NO IDEA what the .md5 thing means, and I don't know if this is what is making the passwords screwy.

 

On another note, I have no idea of the cpassword part of my table, but the script seems to want it there, so, it's there. o.o"

 

Help is appreciated. Thank you.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.