Keeping Whitespace But Remove Characters PHP

Soldato
Joined
30 Nov 2005
Posts
3,084
Location
London
I'm inserting some values into a MySQL database but want to remove any suspicious characters whilst preserving whitespace.

Would just mysql_real_escape_string be sufficient in terms of security?

Cheers.
 
Well I want to keep numbers and letters (Upper and Lower case are fine), plus punctuation such as Full stop, question mark and exclamation mark.

Everything else such as Quotes etc would rather remove.

I've tried looking on Google and most of the 'replace strings' remove whitespace aswell.
 
Back
Top Bottom