PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
<?php
if ( !checkString( $email) || !eregi( "^[A-Za-z0-9\_-]+@[A-Za-z0-9\_-]+.[A-Za-z0-9\_-]+.*", $email)) {
echo "You have entered an <b>invalid email</b>.<br> Please go back and try again.";
exit;
}
?>
If I wanted to restrict the user from inputting malicious code such as <script> alert("boo");<script> could I still use the eregi function? I mean I just can't figure out what the syntax would be to not allow the user to input, for instance, '<' or '>' sign.
lol thanks for that! I must have left my brains at home. I am at Starbucks sipping some coffee and chilling. I actually was busting my brains out trying to come up with a way of solving that. Anyway, I appreciate your help in this one.