View Single Post
ישן 28-03-06, 12:38   # 1
Cool_DuDu
חבר פורום
 
מיני פרופיל
תאריך הצטרפות: Oct 2005
גיל: 35
הודעות: 183

Cool_DuDu לא מחובר  

מה הבעיה בקוד?

קוד:
<?
//mysql
include("db.php");

//תנאי לשליחת טופס
if(isset($_POST["submit"])) {

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

$query=mysql_query("SELECT * FROM admin WHERE username='$user'");
$row=mysql_fetch_array($query);
$dbuser=$row['username'];
$dbpass=$row['password'];
}

if($dbuser!=$user && $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;


?>
  Reply With Quote