אשכול: בעיה ב-md5
View Single Post
ישן 18-06-09, 14:18   # 2
Jonathan Zeierman
חבר וותיק
 
מיני פרופיל
תאריך הצטרפות: Jun 2007
הודעות: 1,003

Jonathan Zeierman לא מחובר  

מצטער, לא יכול לערוך.
ניסתי משהו כזה:
PHP קוד:
    if (isset($_POST["send"]))  
    {  
        
//////////////////////////////////////////////////////////////////  
        // If user & pass are right, create session and login. ///////////  
        //////////////////////////////////////////////////////////////////  
            
$user $_POST["user"];  
            
$pass md5($_POST["pass"]);  
              
            
$query "SELECT * FROM users WHERE user = '{$user}' AND password = '{$pass}'";  
            
$result mysql_query($query)  
            or die(
"SQL Getting The Next Error:" mysql_error());  
              
                if(
mysql_fetch_rows($query) > 0
                { 
                      
                    
$_SESSION["user"] = $user;  
                    
$_SESSION["pass"] = $pass;  
                    
header("Location: manage.php?act=Admin");  
                }  
              
                    
///////////////////////////////////////////////////////////////////  
                    // If user & pass worng, show us an erroe msseage.  ///////////////  
                    ///////////////////////////////////////////////////////////////////  
                   
else  
                    {  
                        echo 
'<html dir="rtl">  
                        <head>  
                        <link rel="stylesheet" type="text/css" href="includes/css/style.css" media="screen"/>  
                        <meta http-equiv="Content-Language" content="he">  
                        <meta http-equiv="Content-Type" content="text/html; charset=windows-1255">  
                        <title>שגיאה</title>  
                        </head>  
                        <body>  
                        <center>  
                        <div class="error" style="width:350px" align="right">  
                        <table cellpadding="6" cellspacing="2" width="100%">  
                        <tr>  
                        <td>  
                        <img src="images/error.gif" /> <b>שגיאה:</b> שם משתמש ו/או סיסמה שגויים.</td>  
                        </tr>  
                        </table>  
                        </div><div class="space"></div>  
                        </center>  
                        </body>  
                        </html>'
;  
                    } 
    } 
אבל עדיין לא עובד ולא מחזיר שום שגיאה.
__________________
יונתן.
אימייל: jonathan@zeierman.net
  Reply With Quote