Link to home
Start Free TrialLog in
Avatar of etechnicsit
etechnicsit

asked on

Preg_Match to error out page on html tags

Experts,

I have a form which parses on message board post data to a validation page.  I am looking for a preg_match expression that will error out when it finds a < or > in a string.

code is:

if (!preg_match('???????', $_POST["t_title"]) || !preg_match('?????????', $_POST["t_body"])){
include (error.php);
}
else {
include (thankyou.php);
}

Thank you
ASKER CERTIFIED SOLUTION
Avatar of hernst42
hernst42
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial