View Single Post
ישן 08-02-06, 21:24   # 5
בניה
משתמש - היכל התהילה
 
מיני פרופיל
תאריך הצטרפות: Oct 2005
מיקום: נחושה
הודעות: 3,434

בניה לא מחובר  

תנסה את זה:

בס"ד

PHP קוד:
<?php
session_start
();
require(
'configure.php');
$query=mysql_query("SELECT * FROM  admins WHERE user='{$_POST['user']} limit 1'") or die (mysql_error());
if(
mysql_num_rows($query)==0){
    echo 
"User is not exist! <a href=\"index.php\">Try Again!</a>";
}else {
$rec=mysql_fetch_array($query);
if(
$_POST['pass']==$rec['pass']) {
$_SESSION['id']=$rec['id'];
$_SESSION['user']=$rec['user'];
$_SESSION['pass']=$rec['pass'];
if (isset(
$_SESSION['id'])) {
?>
<frameset cols="100%, 175">
<frameset rows="20, 83">
         <frame name="logo" src="logo.php" noresize="yes" />
         <frame name="main" src="main.php" noresize="yes" />
    </frameset>
         <frame name="menu" src="menu.php" noresize="yes" />
     </frameset>
<?php
} else {
?>
<meta http-equiv="Refresh" content="0; URL=index.php">
<?php
}
} else {
echo 
"Password Incorrect! <a href=\"index.php\">Try Again!</a>";
}
}
?>
הקוד ממש מבולגאן אז לא בדקתי אותו לגמרי.
  Reply With Quote