View Single Post
Old 04-17-2008, 05:04 PM  
PornGeneral
Confirmed User
 
Join Date: Sep 2004
Location: In front of computer
Posts: 564
Don't forget some xss cleaning functions

Code:
// Prep user input for storage - XSS cleanup
function xss_input($input) { 
    $input = trim($input); 
    if (!get_magic_quotes_gpc()) { 
        return addslashes($input); 
    } 
    return $input; 
} 

// Prep user inputed data for viewing in html page, textbox, or textarea
function xss_output($output) { 
    $output = stripslashes($output); 
    return htmlspecialchars($output); 
}
__________________
"The object of war is not to die for your country but to make the other bastard die for his." -Patton
"Only the dead have seen the end of war." -Plato
PornGeneral is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote