Jump to content

tarun

Members
  • Posts

    321
  • Joined

  • Last visited

    Never

Posts posted by tarun

  1. By Input File Do You Mean The db.txt File

    It Looks Similar To This

    user1|-|pass1
    user2|-|pass2

     

     

    And With This "NEW" Code I Get:

    Username And Password Do Not MatchUsername And Password Do Not Match

     

    It Comes Out Twice Because There Are Two Columns Of Data (eg. Col1:user1 Col2:pass1)

  2. <?php
    $user  =  $_POST["u"];
    $pass  =  $_POST["p"];
    $db = file("db.txt");
    
    foreach($db as $key => $val) {
    $data[$key] = explode("|-|", $val);
    }
    
    for($k = 0; $k < sizeof($db); $k++) { 
    $u = $data[$k][0];
    $p = $data[$k][1];
    
    if ( $u == "$user" ) {
    if ( $p == "$pass" ) {
    echo 'You Are Now Logged In As: '.$u.'';
    }
    else {
    echo 'Username And Password Do Not Match';
    }
    
    }
    
    }
    ?>

     

    Theres Still More To Add When Your Logged In Such As Sessions

    But At The Moment I Can't Even Log In

    I Get My Error "Username And Password Do Not Match"

  3. My Website Runs On Flat Files (Due To Limited SQL Resources)

    And Need To Protect Those Precious txt Files

     

    But How Could I Do It?

    HTACCESS Would Work Wouldn't It

    But People Could Just Use file_get_contents On The Files

    Any Other Methods...?

     

    ANY Contribuations WILL Be GREATLY Appreciated

    Thnx,

    Tarun

  4. Well...

    Im Actually Looking For The PHP To Create The Sound/Music File

     

     

    The Idea Is That You Type A Letter In The Form And Submit It And The PHP Create An MP3 File With The Word Being Said

  5. And I Get Different Errors Each Time I Refresh The Page

     

    1.

    Warning: mime_magic: broken symlink ($file) in /home/www/**********/test2.php on line 3

     

    Warning: Cannot modify header information - headers already sent by (output started at /home/www/**********/test2.php:3) in /home/www/**********/test2.php on line 13

    The File Type : "" Is Not Supported

     

    2.

    The File Type : "application/octet-stream" Is Not Supported

     

    3.

    The File Type : "text/plain" Is Not Supported

     

    4.

    Warning: mime_magic: invalid mode 026752314425. in /home/www/**********/test2.php on line 3

     

    Warning: Cannot modify header information - headers already sent by (output started at /home/www/**********/test2.php:3) in /home/www/**********/test2.php on line 13

    The File Type : "" Is Not Supported

     

    5.

    The File Type : "httpd/unix-directory" Is Not Supported

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.