View Single Post
ישן 24-03-09, 01:12   # 1
N0B0DY
חסום
 
מיני פרופיל
תאריך הצטרפות: Jan 2009
הודעות: 215

N0B0DY לא מחובר  

תנסה ככה:
PHP קוד:
<? require "config.php"?>
<html dir="rtl">
<head>
    <title>Pstyle- úéëðåú åòéöåá àúøéí | áðééú àúøéí | òéöåá àúøéí | äðôùåú ôìàù | àúøé ôìàù</title>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1255" />
    <meta http-equiv="Content-Language" content="he" />
    <link type="text/css" rel="stylesheet" href="style.css" />
</head>
<body bgcolor="#ffffff">
<form action='' method='post'>
<center>

ùí îùúîù :
<input type="text" name="aname" id="aname" style="width:200px;" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;



ñéñîà îùúîù :
<input type="password" name="pname" id="pname" style="width:200px;" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<br />

<input type="submit" name="add" id="add" style="width:100px;" />

</form>

<?php
if (isset($_POST['add']))
{
$aname htmlspecialchars(mysql_real_escape_string($_POST['aname']));
$pname htmlspecialchars(mysql_real_escape_string($_POST['pname']));
    
//checking if all fields were full
    
$error "";
    if (empty(
$aname))
    {
        
$error .= "Admin name is empty<br>";
    }
    if (empty(
$pname))
    {
        
$error .= "Admin Pass is empty<br>";
    }

    echo 
$error
    if (
$error == "")
    {
        
$query_del mysql_query("SELECT * FROM users WHERE admin_name = '".$_POST['aname']."' AND admin_pass = '".$_POST['pname']."'") or die (mysql_error());
        if (
mysql_num_rows($query_del) > 0)
        {
            echo 
"The Username and Password Match! you are logged in :)";
            
$_SESSION['username'] = "($_POST["aname"])";
            
$_SESSION['password'] = "($_POST["pname"])";
        echo 
"<meta http-equiv='Refresh' content='1.5; url=DeleteServer.php'>";
        }
        else
        {
            echo 
"Wrong details!";
        }
    }
}
?>

</body>
</html>
כנראה מקודם שכחתי איזה פסיק או משהו ויש סיכוי קטן שגם עכשיו חח
  Reply With Quote