20-01-2010, 13:38
|
|
|
חבר מתאריך: 16.09.08
הודעות: 433
|
|
קוד PHP:
if($_POST['submit'])
{
if($this->user && $this->password)
{
$this->res = mysql_query("SELECT * from admin where username = '{$this->user}' AND password = '{$this->password}'");
$this->row = mysql_fetch_array($this->res);
if(mysql_num_rows($this->res) != 0 )
{
setcookie("adminu",md5($this->user),time()+3600, '/', '', false, true);
setcookie("adminp",md5($this->password),time()+3600, '/', '', false, true);
setcookie("adminm",$this->row['id'],time()+3600, '/', '', false, true);
echo "<meta http-equiv=\"refresh\" content=\"0;url=index.php\" />";
}
else
{
admin_familia::login_html();
echo "הסיסמאות לא תואמות";
}
}
else
{
admin_familia::login_html();
echo "עלייך למלאות הכל";
}
}
_____________________________________
היי,
שמי דן , ואשמח לעזור לכם בכל פנייה שהיא
ניתן ליצור איתי קשר באיימיל (DanDan@walla.com) במסנג'ר (DanDan@walla.com) ובאיסיקיו (12348188)
גלישה נעימה...
|