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

    php security IP logging?

    You're contemplating making an admin page without a password? Also, working on the basis of IP is very flawed. If your site gets big and you need more admins, what will you do then? If you know somebody really trustworthy and they want to help you but they're on AOL what will you do then...
  4. D

    php security IP logging?

    You're contemplating making an admin page without a password? Also, working on the basis of IP is very flawed. If your site gets big and you need more admins, what will you do then? If you know somebody really trustworthy and they want to help you but they're on AOL what will you do then...
  5. D

    PHP string validation?

    use if(stristr("kitten", $_POST['checker'])){ code to exectute} else{ other code to execute }
  6. D

    PHP string validation?

    use if(stristr("kitten", $_POST['checker'])){ code to exectute} else{ other code to execute }
  7. D

    How to "convert" my XHTML site into HTML 5?

    XHTML and HTML5 are not different languages. XHTML is just a step up in the quality and readability of the coding standard. By 'converting' you'd essentially be downgrading your coding standard. You can use HTML 5 features in strict XHTML
  8. 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