Results 1 to 8 of 8

Thread: MySQL PHP

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date: Mar:2013
    Location: Sofia
    Posts: 33

    MySQL PHP

    ,

    . :
    PHP Code:
    if(isset($_POST['submit']))
    {
        
    $username $_POST['username'];
        
    $password $_POST['password'];
        
    $hash_pass md5($password);
        
        
    //echo $hash_pass;
        
        
    $sql "SELECT username FROM admins WHERE username = '{$username}' AND password = '{$hash_pass}'";

    1- 2 , 3 md5. SQL- . $hash_pass "6253e1406b64bbe6ba7b00ac0bf81257" , user-?

    ?
    ALL GREAT THINGS ARE SIMPLE AND MANY CAN BE EXPRESSED IN SINGLE WORDS:
    FREEDOM, JUSTICE, HONOR, DUTY, MERCY, HOPE.
    Winston Churcill

  2. #2
    Registered User
    Join Date: Sep:2003
    Location: Where you live
    Posts: 976
    "echo $hash_pass" ? . , "echo $sql"

  3. #3
    Registered User
    Join Date: Nov:2012
    Location:
    Posts: 92
    , .

  4. #4

  5. #5
    Registered User
    Join Date: Dec:2003
    Posts: 2,817
    md5 :6253e1406b64bbe6ba7b00ac0bf81257
    pass : cocacola

    Gigabyte DS3P, E4400@9x333, 2x2Gb Super T@1000Mhz, Gigabyte GTX460OC 768Mb

  6. #6
    Registered User
    Join Date: Nov:2011
    Location: Sofia
    Posts: 165
    $sql = "SELECT username FROM admins WHERE username = '{$username}' AND password = '{$hash_pass}'";
    SQL injection..... ....

  7. #7
    Developer/Gamer tengam's Avatar
    Join Date: Feb:2005
    Location:
    Posts: 1,459
    , MD5 , seed- . , prepared statements.
    |ASUS RoG Z690-E i7-13700k@ 5.6/4.3Ghz + Kraken X63 216GB Kingston Fury Beast 6000hmz 32-40-40-28 | RTX4080 | 256GB 960Evo, 1TB 970Evo, 2x2TB 980Pro, 1TB 860Evo|HX1200|CM MasterCase Pro 5|
    |Steam Deck 256GB | 36 TB Unraid NAS| Asus Z87-DELUXE i7-4790K 32GB DDR3|
    TengaM#2700 / 7engaM

  8. #8
    Registered User
    Join Date: Feb:2012
    Location: Sofia
    Posts: 710
    ,
    , PDO. - scrypt + salt.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Copyright © 1999-2011 . .
iskamPC.com | mobility.BG | Bloody's Techblog | | 3D Vision Blog |