Jump to content

inserting url


narjis

Recommended Posts

If you provide an html format body with the email then you handle a url like any webpage --- via an anchor tag.  Whether or not the email client will support html is entirely controlled by the email client -- email is not a web browser.  With that said, most email clients will support simple html, and they also tend to support recognizing that url's which start with http:// should be converted into links.

Link to comment
Share on other sites

Here's my code of function sending email. In the $urtext I am sendinding a hyperlink and want the $token to return in another function in register.php. Can I call a function from register.php? How?

 

function send_mail($name,$email,$location,$interests)
{
$token = rand();
$urtext = "Please click on the following link for your registration to be complete
         <a href=http://localhost/PHPFAQProject/register.php?t=$token>Click Here </a>";
if ((!isset($name))||(!isset($email))) {  //checking for blank input
echo "<b> Please check you have not enetered the name or the email address</b>";
}

  $user = '[a-zA-Z0-9_\-\.\+\^!#\$%&*+\/\=\?\`\|\{\}~\']+';
  $domain = '(??:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.?)+';
  $ipv4 = '[0-9]{1,3}(\.[0-9]{1,3}){3}';
  $ipv6 = '[0-9a-fA-F]{1,4}(\:[0-9a-fA-F]{1,4}){7}';
//checking for e-mauil validity
if (preg_match("/^$user@($domain|(\[($ipv4|$ipv6)\]))$/", $email))
{
mail('narjisfatima@yahoo.com','feed back',$urtext);
echo " <html>
        <head><title>Email example</title>
        </head>
        <body>
        
        <p>Your text has ben sent. Check your mail</p>
        </body>
        </html>";}
else{
echo "$name<br>";
echo "$email" ;
echo "Please input valid email" ;}
}

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.