943,172 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Marked Solved
  • Views: 183
  • PHP RSS
Sep 1st, 2010
0

mailto function

Expand Post »
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..
<a href = "mailto : $row['sup_email']."></a>
But its not working..

Please give a reply..Thanks
Last edited by sami.asanga; Sep 1st, 2010 at 1:24 pm.
Similar Threads
Reputation Points: 10
Solved Threads: 1
Light Poster
sami.asanga is offline Offline
35 posts
since Aug 2010
Sep 1st, 2010
0
Re: mailto function
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:

PHP Syntax (Toggle Plain Text)
  1. <a href = "mailto:<?php echo $row['sup_email']?>"></a>
Reputation Points: 27
Solved Threads: 27
Junior Poster in Training
svilla is offline Offline
88 posts
since Aug 2010
Sep 2nd, 2010
0
Re: mailto function
I put that inside a while loop so again no need to put <?php ?> right??
I did like this,
PHP Syntax (Toggle Plain Text)
  1. $email=$row['sup_email'];
  2. echo "<td class='style3'><a href = mailto:'$email'?subject='FillUpStocks'>$email</a></td>";
And the problems solved...
Btw thanks for your reply..
Reputation Points: 10
Solved Threads: 1
Light Poster
sami.asanga is offline Offline
35 posts
since Aug 2010
Sep 2nd, 2010
0
Re: mailto function
<?php

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

?>
Use this code
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Razer_Thomas is offline Offline
1 posts
since Sep 2010

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: Can't override the __doRequest function from the SoapClient class
Next Thread in PHP Forum Timeline: combo box





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC