הרשם שאלות ותשובות רשימת חברים לוח שנה הודעות מהיום

חזור   הוסטס - פורום אחסון האתרים הגדול בישראל > עיצוב גראפי, תכנות על כל שפותיו וקידום ושיווק אתרים > פורום תיכנות

   
|!|

 
 
כלים לאשכול תצורת הצגה
Prev הודעה קודמת   הודעה הבאה Next
ישן 08-03-08, 17:36   # 13
DanielS
הוסטסניון
 
מיני פרופיל
תאריך הצטרפות: Jan 2007
מיקום: ישראל
הודעות: 2,429

DanielS לא מחובר  

PHP קוד:
<?php
function login($UserName$UserPassWord$CheckBox)  

    global 
$sql
    
$UserName     htmlspecialchars($UserName); 
    
$UserName     mysql_real_escape_string($UserName); 
    
$UserPassWord htmlspecialchars($UserPassWord); 
    
$UserPassWord mysql_real_escape_string($UserPassWord); 
    
$UserPassWord md5($UserPassWord); 
    if (
$this->IsLoggedIn() == true) { 
        
$content "To login, please logout."
    } 
    else if (
$UserName == "" || $UserPassWord == "") { 
        
$content "Please fill all the requirement fields."
    } 
    else { 
        echo 
"sss<br />"
        
$sql->query("SELECT `UserID` FROM `users` WHERE `UserName`='$UserName' AND `UserPassWord`='$UserPassWord'"); 
        if (
$sql->NumRows() == 0) { 
            echo 
"sss<br />"
            
$content "Wrong user name or password"
        } 
        else { 
            if (
$CheckBox == true) { 
                
setcookie("Login"$UserPassWord); 
                
$_SESSION['Login'] = $UserPassWord
            } 
            else { 
                
$_SESSION['Login'] = $UserPassWord
            } 
            
$content "Succedded!"
        } 
        echo 
"sss<br />"
    } 
    return 
$content;
}  
?>
עשית כמה שטויות
עשית בכל מקרה יצירת סשן.
ד"א אחרי כמה בדיקות. בדוק את המחלקת DB שלך

עריכה:
טוב נעשה כמה בדיקות במסנג'ר כי כל דקה צריך לערוך לעשות כמה בדיקות
__________________
Daniel
Email : daniel [AT] smartwd [DOT] com


Last edited by DanielS; 08-03-08 at 18:08..
  Reply With Quote
 

חברים פעילים הצופים באשכול זה: 1 (0 חברים ו- 1 אורחים)
 


חוקי פירסום
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is מופעל
סמיילים הם מופעל
[IMG] קוד מופעל
קוד HTML מכובה

קפיצה לפורום


כל הזמנים הם GMT +2. הזמן כעת הוא 04:15.

מופעל באמצעות VBulletin גרסה 3.8.6
כל הזכויות שמורות ©
כל הזכויות שמורות לסולל יבוא ורשתות (1997) בע"מ