Clean Input

Namecheap AuctionsNamecheap Auctions
SpaceshipSpaceship
SpaceshipSpaceship
Watch
These are some code snippets for use in cleaning input. Please note that these are NOT the complete security solution; for best results, you should use Whitelist-based authentication.

For AJAX requests:

Code:
foreach ($_POST as $key => $value) 
  $_POST[$key]=trim(strip_tags(urldecode($value)));

For standard forms:

Code:
foreach ($_POST as $key => $value)
  $_POST[$key]=trim(strip_tags($value));

Jason
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
CatchedCatched

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com
Catchy
DomDB
NameFit
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back