Search results

  1. D

    PHP validate password?

    I need a function or a few lines of code that will check whether a password that has been entered contains 2 numbers and 2 letters and checks that they DONT contain characters like < > ? & $ I've already looked at that and cant find what i want not quite sure :D i've had to protect against...
  2. D

    Best way to deal with SQL injection for PHP?

    Use strong validation. If the input is a number, use the is_numeric function to make sure no other characters are being inserted. Only allow data that you expect to be inserted
  3. D

    Why is php unsetting session variables on its own?

    When i refresh a page, all of my session data is reset. I havent used unset() or session_destroy() anywhere on the page. Code $id = $_SESSION['userid']; $loggeduser = $_SESSION['user']; $userfromdb = mysql_fetch_array(mysql_query("SELECT username,id,code FROM users WHERE username='$loggeduser'...
Back
Top