I agree with niggles, you may want remove the tags, or if you need to detect then I would do a mix of solutions due to the XSS.
Please note that I haven't tested this code out, I just changed around the info from
PHP: strpos - Manual.
Code:
$haystack = $_POST["textinput"];
$haystack = str_replace("<", "<", $haystack);
$haystack = str_replace(">", ">", $haystack);
$needle = '</>';
$pos = strpos($haystack, $needle);
if ($pos === false) {
//add to db
} else {
echo "Please remove those tags and try again";
}