User Profile

Collapse

Profile Sidebar

Collapse
beepdev
beepdev
Last Activity: Nov 11 '07, 09:11 PM
Joined: Nov 10 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • beepdev
    replied to Being safe with user's input
    in PHP
    If only I could spell

    Code:
    function secureData($string, $lowercase = false)
    {
    $string = trim($string);
    $string = htmlspecialchars($string);
    
    if ($lowercase)
    $string = strtolower($string);
    
    $string = stripslashes($string);
    
    return $string;
    }
    call it like:
    Code:
    $string = secureData($string, false);
    ...
    See more | Go to post

    Leave a comment:


  • beepdev
    replied to Being safe with user's input
    in PHP
    Code:
    function secureData($string, $lowercase = false)
    {
    $string = trim($string);
    $sting = htmlspecialchars($string);
    
    if ($lowercase)
    $string = strtolower($string);
    
    $string = stripslashes($string);
    
    return $string;
    }
    call it like:
    Code:
    $sting = secureData($string, false);
    See more | Go to post

    Leave a comment:


  • beepdev
    started a topic When to use memcache?
    in PHP

    When to use memcache?

    I am looking around and I am very interested in memcached and it's php extension. After looking around on the net I can't get myself acquainted with it. My website is written in php and uses MySQL as the database. It is a fairly small site for linux distros. Having so many people connect to the site creates a major load on apache and MySQL.

    Since I've read that using memcache will decrease your server load significantly I'm basically...
    See more | Go to post

  • beepdev
    replied to Return value of 1 instead of -1
    in PHP
    Or you can get the absolute value:

    [PHP]$value = abs($value);[/PHP]
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...