Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16

Thread: how to display multiple blob images from mysql : mysql, php

  1. #11
    Join Date
    Feb 2006
    Posts
    4,242
    Rep Power
    0

    Default

    Quote Originally Posted by digimon View Post
    It's strange, i did this in ASP.NET 2 days ago. It's the same thing but diff language
    Do you want to switch/convert? lol
    php all the way;
    |--- www.RealJamaicaEstate.com ™ ---|
    Invest small = small returns [micro enterprise] | Invest Big = returns Big [macro enterprise]
    --- www.fashionsJAMAICA.com ™ -|- www.ChampsJamaica.com

  2. #12
    Join Date
    Feb 2006
    Posts
    185
    Rep Power
    0

    Default

    Thuggest u need to sanitise all user input when writing your scripts. Assume that all user input is potentially malicious. This is important not only with SQL but with *ANY* form of user input. Google addslashes() and magic_quotes...
    PHP || MySQL || XHTML || CSS || JavaScript


  3. #13
    Join Date
    Jan 2007
    Posts
    197
    Rep Power
    0

    Default

    Quote Originally Posted by Sutra View Post
    Thuggest u need to sanitise all user input when writing your scripts. Assume that all user input is potentially malicious. This is important not only with SQL but with *ANY* form of user input. Google addslashes() and magic_quotes...
    Can u give me an example of how that piece of code could utilize the addslashes and magic_quotes?

  4. #14
    Join Date
    Feb 2006
    Posts
    185
    Rep Power
    0

    Default

    Magic Quotes is defined in your php.ini file. When it is enabled it automagically escapes php special characters in all user input accessed via $_GET or $_POST such as < > ; " etc. Magic Quotes is enabled by default but in future versions of php it is a deprecated feature and will be turned off by default mainly because it promotes sloppy coding. To manually ensure that you escape special characters in all user input you use the addslashes() function. You can use it like this:

    Code:
     
    <?php
    
    $randomvariable = $_POST['randomvariable'];
    
    $sanitizedradomvariable = addslashes($randomvariable);
    
    //now u can use $sanitizedrandomvariable without worrrying about any php code //injection
    
    ?>
    PHP || MySQL || XHTML || CSS || JavaScript


  5. #15
    Join Date
    Feb 2006
    Posts
    4,242
    Rep Power
    0

    Default

    |--- www.RealJamaicaEstate.com ™ ---|
    Invest small = small returns [micro enterprise] | Invest Big = returns Big [macro enterprise]
    --- www.fashionsJAMAICA.com ™ -|- www.ChampsJamaica.com

  6. #16
    Join Date
    Jan 2007
    Posts
    197
    Rep Power
    0

    Default

    Quote Originally Posted by Sutra View Post
    Magic Quotes is defined in your php.ini file. When it is enabled it automagically escapes php special characters in all user input accessed via $_GET or $_POST such as < > ; " etc. Magic Quotes is enabled by default but in future versions of php it is a deprecated feature and will be turned off by default mainly because it promotes sloppy coding. To manually ensure that you escape special characters in all user input you use the addslashes() function. You can use it like this:

    Code:
     
    <?php
    
    $randomvariable = $_POST['randomvariable'];
    
    $sanitizedradomvariable = addslashes($randomvariable);
    
    //now u can use $sanitizedrandomvariable without worrrying about any php code //injection
    
    ?>
    Bless sutra, will drop that in asap.

Posting Permissions

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