user3105748 user3105748 - 2 years ago 75
PHP Question

sending an email from HTML form, address in SQL

Using this example, Add php variable inside echo statement as href link address?,

I am able to grab an email address from my SQL DB and make it clickable in my form. The HTML looks like this:


but when I either hover over if or click it, it adds the name of my domain before it. So clicking the above tries to go to:

Here is some of the code that generates my link

while($row=mysql_fetch_array($result, MYSQL_ASSOC))

echo "

<div class='eventContact'>Contact: <a href='".$tempcontact."'>$tempcontact</a></br></div>


I am guessing it shouldn't be a 'a href' but not sure what it should be.

Answer Source

As I said in the comment:

Change it to -this will fire the users email client

<a href="">Email me</a>

You can then set the subject of the email too if you want

<a href="">Email me</a>
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download