View Single Post
  #5 (permalink)  
Old 04-02-08, 10:54 AM
curbview.com's Avatar
curbview.com curbview.com is offline
Junior Code Guru
 
Join Date: May 2006
Posts: 555
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by dreamydesigner View Post
Hi curbview,
Hi,
Quote:
Originally Posted by dreamydesigner View Post
... I did not understand some of what you said, like what an "OP" is
OP stands for "Original Poster" or Original Person

Quote:
Originally Posted by dreamydesigner View Post
or a modded regex.
Here's a modded regex sample to filter out unwanted scripts in the user-submitted form you have on your web site:

PHP Code:

$name $POST_['NAME'];
// let's remove all non-alphanumeric characters from the person's name!
$name preg_replace('/[^a-zA-Z0-9 ]/'''$name); 

Quote:
Originally Posted by dreamydesigner View Post
Do you know of an existent script I could modify? Thanks.
Taking the above example and using it to filter out people or bots from submitting unwanted code through the form on your web site is easy. You could use the same regex above to filter the address field like so:
PHP Code:

$address $POST_['ADDRESS'];
// let's remove all non-alphanumeric characters from the person's address!
$address preg_replace('/[^a-zA-Z0-9 ]/'''$address); 
If you need more help, let me know.
__________________
Whatever you decide, you should make sure best security methods are used and practiced. Should you really need more help, PM me.
Reply With Quote