954,180 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

mailto function

Hi,

Can anyone tel me how to get values from the database to work with mail to function??
I mean rather than giving like mailto:xxxxx@xx.com ,I want to take email ids from the database.How should I do it?

I did like this..

But its not working..:(

Please give a reply..Thanks

sami.asanga
Light Poster
35 posts since Aug 2010
Reputation Points: 10
Solved Threads: 1
 

In order to access php variables They need to be inside <?php ?> tags.

Assuming that you have previously retrieved the correct row and that the $row now holds the data, you can use:

<a href = "mailto:<?php echo $row['sup_email']?>"></a>
svilla
Junior Poster in Training
88 posts since Aug 2010
Reputation Points: 27
Solved Threads: 27
 

I put that inside a while loop so again no need to put <?php ?> right??
I did like this,

$email=$row['sup_email'];
echo "<td class='style3'><a href = mailto:'$email'?subject='FillUpStocks'>$email</a></td>";

And the problems solved...:)
Btw thanks for your reply..

sami.asanga
Light Poster
35 posts since Aug 2010
Reputation Points: 10
Solved Threads: 1
 

<?php

$body="Whats UP";
mail("EMAIL@YOURSITE.COM", "SUBJECT HERE", $body, "From: [email]ADMIN@YOURSITE.COM[/email]");

?>
Use this code

Razer_Thomas
Newbie Poster
1 post since Sep 2010
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You