View Single Post
ישן 28-03-06, 18:24   # 9
FireAngel
משתמש חדש
 
מיני פרופיל
תאריך הצטרפות: Feb 2006
הודעות: 10

FireAngel לא מחובר  

ציטוט:
נכתב במקור על ידי BlueNosE
PHP קוד:
if(isset($_POST["submit"])) {

$pass=$_POST["password"];
$user=$_POST["username"];

if (
$query=@mysql_query("SELECT * FROM admin WHERE username='$user'")
{
$row=mysql_fetch_array($query);
$dbuser=$row['username'];
$dbpass=$row['password'];
}
else {echo 
"error1";exit;}
}

if((
$dbuser!=$user) or ($dbpass!=$pass)) {
echo 
"you cant enter here";
} else {
echo
"hello man";
}


echo <<<html
<title>login page</title>
<body>
<div align="center dir="rtl">
<strong>login</strong><br>
<post method="post">
username: <input type="text" name="username" id="username" />
password: <input type="password" name="password" id="password" />
<input type="submit" name="submit" id="submit" value="שלח טופס" />
html;


?> 
אם זה יחזיר לך error1, תגיד לי.
הבעיה שכמעט בטוח זה לא יחזיר לו.
__________________
מתכנת HTML, JS, CSS, PHP.

ICQ: 151616975
MSN: yair@bestsites.co.il
דואר אלקטרוני: yair@tsarfaty.be
  Reply With Quote