how to verify an email address?
Posted: Thu May 23, 2024 9:11 pm
Hi everyone,
I’m looking to find out how to verify an email address...
I have a recommendation script on my site that works well if you enter an address like blou@blabla.com, but if I just enter blou, I get an error message that doesn’t display “nicely,” I would say :lol:
Here’s what it says:
For your information, here is my script:
I’m looking to find out how to verify an email address...
I have a recommendation script on my site that works well if you enter an address like blou@blabla.com, but if I just enter blou, I get an error message that doesn’t display “nicely,” I would say :lol:
Here’s what it says:
Code: Select all
So if someone could point me to a simple tutorial to fix this problem, I would really appreciate it!Warning: mail() [function.mail]: Invalid mail. to = [blou] in /mnt/128/sdb/2/c/blingbling/pages/rec.php on line 11
For your information, here is my script:
Code: Select all
So from what I have seen so far, it’s this:
<?php
if($_POST)
{
if(empty($_POST['nom']) OR empty($_POST['email']) OR empty($_POST['content']))
{
echo "<p>Please fill in all the fields.</p>";
}
else
{
mail($_POST['email'], stripslashes($_POST['nom'])." recommends a site to you", stripslashes($_POST['content']), "From: ".$_POST['email']."\nReply-To: ".$_POST['email']);
echo "<p>Your friend has been notified.</p>";
}
}
?><form action='<?php echo $PHP_SELF; ?>?page=rec' method='post'>
<fieldset>...etc</fieldset></form>
Code: Select all
!eregi("^[0-9a-z]([-_.]?[0-9a-z])*@[0-9a-z]([-.]?[0-9a-z])*\.[a-z]{2,4