| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Can anyone give me a helping hand??
hi i created a testing website where i made a login page and register page i'd enter a new user details and when i click register it comes up with an error /register? no info gets put into the database
i was wondering if anyone could help me make a login page, a register page that will work or tell me where i'm going wrong Thanks in advance Pete |
|
#2
|
|||
|
|||
|
i'll show you what i've done for mine
Code:
if (isset($login))
{
if(ereg('[^a-zA-Z0-9_]{1,}', $username))
{
$no1 = "username contains invalid letters
";
}
if(ereg('[^a-zA-Z0-9_]{1,}', $password))
{
$no2 = "password contains invalid letters
";
}
if ((!$no1) and (!$no2))
{
$results = @mysql_num_rows(@mysql_query("SELECT * FROM users WHERE password='$password' AND username='$username'"));
if($results == 1)
{
//person entered the right info
}
else
{
echo "username/password pair not found";
}
}
else
{
echo $no1;
echo $no2;
}
}
hopefully that all works. if it doesn't, just post again |
![]() |
| Viewing: Tutorialized Forums > Desktop Programming > Delphi > Can anyone give me a helping hand?? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|