How to display email as hyperlink in php results -
i have database , i'm trying display email address hyperlink when query doesn't match on our database. i'm using following...
php code...
else{ // if there no matching rows following echo "<br /><br /><br /><strong><h2>"."you have searched term not in database. please contact <a href=\"mailto:email@domain.com" . htmlentities($_post['email@domain.com']) . "\">".htmlentities($_post['email@domain.com']) . "</a>, if think term should added."."</h2></strong>";
but, results this...
"you have searched term not in database. please contact , if think term should added."
everything's there except hyperlinked email address.
thoughts?
try this..
else{ // if there no matching rows following $mail = htmlentities('email@domain.com'); echo "<br /><br /><br /><strong><h2>" . "you have searched term not in database. please contact <a href=\"mailto:$mail\">$mail</a>, if think term should added.</h2></strong>";
Comments
Post a Comment