Sorry I found a mistake in my text. $pass pwd, like it is used in the php.
One more thing: I guess it's the php.ini. there are a few differences
with the two versions. if you want to compare i'll send you the two
phpinfo-files to compare.
The script doesn't work when the username is compared with the entered
username. It's always going to the 'check Username' section.
Please help me :--((
Hello dear group
I have a problem with an authentication in mysql. I got a
database-table 'user' with columns for 'login' and 'passwort' and
several other columns. A customer shall be able to enter his UserID
and Password into fields (html input types) and these are posted to
the following php-script:
Further explanation:
$usid comes from the input type = 'text' ... for the username
$pass comes from the input type = password... for the password.
The problem:
I wrote the php on my machine, where I have LAMP running, and
everything works fine. Then I installed everything to a server, which
is intented for the job, but now the username fails, unless it's
working on my machine. What is wrong, I just cannot explain??? Im
completely pzzled and confused.
Please help me. It would be nice if you'd cc to my email-address too.
Thank you very much for your interest.
dennis
?php
$host = localhost;
$user = load;
$pass = +u3§sr;
$dbname = rbos;
$conex = mysql_pconnect($host, $user, $pass);
if (mysql_select_db($dbname, $conex))
{
$getuser = mysql_query('Select * from user where login =
'.$usid.''); //usid kommt aus dem Eingabefeld
$exuser = '[a-zA-Z]+';
if($entity = mysql_fetch_object($getuser))
{
if (ereg($pwd, $entity-passwort))
{
echo Vielen Dank, Anmeldung erfolgreich;
echo
brWillkommennbsp;.$entity-vorname.nbsp;.$entity-nachname;
}
else
{
echo Login not successful (check
Password);
}
}
else
echo Login not successful (check Username);
mysql_free_result($getuser);
}
else
{
echo Can't connect to database !!! br;
echo mysql_errno() . : . mysql_error() . hr;
}
?
TABLE USER:
mysql describe user;
+--+--+--+-+-+---+
| Field| Type | Null | Key | Default | Extra |
+--+--+--+-+-+---+
| nummer | int(4) | YES | | NULL| |
| login| varchar(8) | YES | | NULL| |
| passwort | varchar(8) | YES | | NULL| |
| vorname | varchar(255) | YES | | NULL| |
| nachname | varchar(255) | YES | | NULL| |
| gruppe | varchar(30) | YES | | NULL| |
| level| int(1) | YES | | NULL| |
+--+--+--+-+-+---+
7 rows in set (0.00 sec)
-
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail
[EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
-
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php