View Single Post
ישן 11-06-07, 06:28   # 3
X-T
חבר וותיק
 
מיני פרופיל
תאריך הצטרפות: Jan 2007
הודעות: 1,021

X-T לא מחובר  

ציטוט:
נכתב במקור על ידי WebProject צפה בהודעה
קודם כל - תאבטח את הנתונים שאתה מקבל מהגולשים.
ובדקת בshow cookies בFF שהעוגיות לא קיימות?
אכן.
הקוד המאובטח:
PHP קוד:
<? 
ob_start
();
include 
"global/global.php";
echo 
'<center><meta http-equiv="Content-Type" content="text/html; charset=windows-1255">';
$submit $_POST['submit'];
$username $_POST['username'];
$password $_POST['password'];
$username htmlspecialchars($usernameENT_QUOTES);
$password htmlspecialchars($passwordENT_QUOTES);
if(
$submit) {
$sql " SELECT * FROM members WHERE username = '$username' AND password = '$password' "
$result mysql_query($sql) or die("בעייה : " mysql_error()); 
if(!
mysql_num_rows($result)) {
echo 
"אחד מהשדות שהזנת שגויים, נא חזור ובדוק שנית";
exit();
}
    
setcookie("user"$username,time() + 3600);
    
setcookie("pw"$passwordtime() + 3600);
    
setcookie("access"$accesstime() + 3600);
echo 
"<meta http-equiv='refresh' content='0; url=index.php'>";
}
ob_end_flush();
?>
__________________
You don't shine if you don't glow
  Reply With Quote