On several of my client's websites I use an HTML form which sends the form to my clients via a PHP form handler.
Sometimes the form is filled in by lowlife and the Address and Message textareas then contain links which are most likely dangerous.
My PHP handlers include several validation filters, but how can I include a validation filter for http:// and/or www.
I want the validation code to do this:-
if (in $useraddress search for the strings http:// || www)
header( "Location: $errorurl" );
exit ;
}
if (in $message search for the strings http:// || www)
{
header( "Location: $errorurl" );
exit ;
}
For explanatory purposes the above is a mixture of plain English and PHP, how do I put it into proper PHP?
Regards Awestruck