Jump to content

Removing email address


j634

Recommended Posts

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

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/

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?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.