j634 Posted July 16, 2009 Share Posted July 16, 2009 My script is moving along nicely and things are coming together. What i need now is a way to remove typed address that have the @ symbol. In my script members can send messages to each other and I need to filter out the address if anyone tries to insert that. My ideal way would be just to remove the entire address and replace it with nothing. Could anyone point me to a tutorial or something? Thanks Link to comment https://forums.phpfreaks.com/topic/166171-removing-email-address/ Share on other sites More sharing options...
phporcaffeine Posted July 16, 2009 Share Posted July 16, 2009 My suggestion is to get a regex email validatior and then when you hit on the email address just do something like str_replace($validatedEmail, '', $content). Here is an email validator that you can use: http://codetree.rthconsultants.com/2009/07/php-basic-email-validation-with-regex/ Link to comment https://forums.phpfreaks.com/topic/166171-removing-email-address/#findComment-876344 Share on other sites More sharing options...
j634 Posted July 18, 2009 Author Share Posted July 18, 2009 Thanks for the reply, however I am unable to get that working. I have tried bad word filters and all have not worked for my form. I am at a loss at the moment, but here is the simple form used to send the messages. <form method="post" action="profile.php?id=<?PHP echo $_REQUEST['id']?>"> <strong><?php echo PROFILE91?>;</strong><br> <textarea cols="60" rows="10" name="Message"></textarea> <input type="hidden" name="writemsg" value="true"> <input type="hidden" name="ToEmailAddress" value="<?PHP echo $row['EmailAddress'] ?>"> <br> <input type="submit" value="Send Message"> </form> Any ideas please? Link to comment https://forums.phpfreaks.com/topic/166171-removing-email-address/#findComment-877458 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.