NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page Email link to a friend code ??

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 10-18-2006, 06:05 AM THREAD STARTER               #1 (permalink)
First Time Poster !
 
gazzip's Avatar
Join Date: Apr 2005
Location: GB
Posts: 6,881
gazzip has a reputation beyond reputegazzip has a reputation beyond reputegazzip has a reputation beyond reputegazzip has a reputation beyond reputegazzip has a reputation beyond reputegazzip has a reputation beyond reputegazzip has a reputation beyond reputegazzip has a reputation beyond reputegazzip has a reputation beyond reputegazzip has a reputation beyond reputegazzip has a reputation beyond repute
 



Email link to a friend code ??


Hi All Anyone know the html code for emailing a link to a friend - one where you can also put in the email subject and a couple of lines about what the link is about ?

Appreciate any help you can provide Thanks



.
gazzip is offline  
Old 10-18-2006, 07:46 AM   #2 (permalink)
NamePros Member
Join Date: Jul 2006
Posts: 94
sote is a jewel in the roughsote is a jewel in the roughsote is a jewel in the rough
 



With plain HTML the most you can do is:
<a href="mailto:yourid@emailprovider.com">Tell a Friend</a>
which will bring up the users default mail program eg: Outlook.
I suggest not using this method as most people don't use these email clients.

On the otherhand, you could create a HTML 'form' which is processed by PHP which is probably the best way to do this.
sote is offline  
Old 10-18-2006, 10:50 AM   #3 (permalink)
Senior Member
 
-Ray-'s Avatar
Join Date: Jun 2005
Location: Pennsylvania
Posts: 1,839
-Ray- has much to be proud of-Ray- has much to be proud of-Ray- has much to be proud of-Ray- has much to be proud of-Ray- has much to be proud of-Ray- has much to be proud of-Ray- has much to be proud of-Ray- has much to be proud of-Ray- has much to be proud of
 



I think this is what he wanted... Put all that in one php page in the following order.. The following code is a form that posts to it self to send mail..


PHP Code:

<?php
 
if (!isset($_POST["send"])){
????: NamePros.com http://www.namepros.com/programming/248439-email-link-to-a-friend-code.html
   
// no post data -> display form
????: NamePros.com http://www.namepros.com/showthread.php?t=248439
?>
HTML Code:
 <form method="POST" action="<?=$_SERVER['PHP_SELF'];?>">
   To: <input type="text" name="to">
   From: <input type="text" name="sender">
   Subject : <input type="text" name="subject">
   Message : 
   <textarea name="message" rows="10" cols="60" lines="20"></textarea>
   <input type="submit" name="send" value="Send">
   </form>
PHP Code:
<?php 
 
}else{

   
// found post data
   
$from=$_POST['sender'];
  
$to=$_POST['to'];

   
// send mail :

   
if (mail($to,$_POST['subject'],$_POST['message'],"From: $from\n")){
     
// display confirmation message if mail sent successfully
     
echo "Your mail sent to $to.";
 }else{
   
// sending failed
    
echo "Your mail could not be sent.";
   }
 }
 
?>
__________________
Poker News, articles, discussion
LIKE THIS

Its an iPod, a phone, and an internet communications device.
-Ray- is offline  
Old 10-19-2006, 08:57 AM THREAD STARTER               #4 (permalink)
First Time Poster !
 
gazzip's Avatar
Join Date: Apr 2005
Location: GB
Posts: 6,881
gazzip has a reputation beyond reputegazzip has a reputation beyond reputegazzip has a reputation beyond reputegazzip has a reputation beyond reputegazzip has a reputation beyond reputegazzip has a reputation beyond reputegazzip has a reputation beyond reputegazzip has a reputation beyond reputegazzip has a reputation beyond reputegazzip has a reputation beyond reputegazzip has a reputation beyond repute
 



Thanks Guys - That php stuff looks a little confusing to me though..well, alot

Maybe it is a javascript code I need ?? I have used it once years ago and I think it was just a case of popping a piece of code in the header as far as I remember.

Anyone know if there is such a javascript code for this ?



.
gazzip is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Liquid Web Smart Servers  
All times are GMT -7. The time now is 02:48 AM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger