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 > Web Design Discussion
Reload this Page Add "E-mail This Page to a Friend"...

Web Design Discussion Discussion of web design techniques, advice, browser issues, software, design firms.

Advanced Search
9 members in live chat ~  
NamePros Design Contests NamePros Design Contests
Forum Sponsorship
Join in on the FUN! You can start an affordable design contest and pick from entries talented members submit or you can enter a design contest for a chance to win CASH PRIZES! What are you waiting for? Get started in the fun TODAY! - Banners, Logos, Mascots, and MORE! (Please READ the design Contest section rules Prior to starting or entering a contest)



Closed Thread
 
LinkBack Thread Tools
Old 03-12-2005, 08:49 PM THREAD STARTER               #1 (permalink)
First Time Poster!
Join Date: Mar 2005
Posts: 1
sevegunter is an unknown quantity at this point
 



Add "E-mail This Page to a Friend"...


I need to know how to add an "E-mail This Page to a Friend" option to the bottom of every product in my shopping cart database. I have over a 1000 products so doing it manually to each product is out of the question. Any suggestions? Thank you for any help!

An example of a product page: Example
sevegunter is offline  
Old 04-09-2005, 12:06 PM   #2 (permalink)
New Member
Join Date: Apr 2005
Posts: 8
adamquaile is an unknown quantity at this point
 



Email Solution


There is a solution, it requires PHP...

????: NamePros.com http://www.namepros.com/web-design-discussion/74942-add-e-mail-this-page-friend.html
Anyway, here goes...

Type this code for your link:

HTML Code:
<?php
$page = $_SERVER["PHP_SELF"];

echo "<a href=\"email.php?page=";
echo $page;
echo "\">Visible link text/img</a>";

?>
Then on your second email page just have something like this:

HTML Code:
<?
if (!isset($page))
{
/*show some error message*/
}
else
{
$subject = "$recipient has suggested a site";
mail($to, $subject, $message, $mailheaders);
}

?>
You also need a form so the user can type in their email, and other things...


Hope this helps, but if it doesn't let me know...
__________________
Adam Quaile
Dancing Badger Web Design (http://www.dancingbadger.co.uk)

For articles, tutorials, tips, tricks etc... on web design, programming, the web, and other similar funky stuff
adamquaile is offline  
Old 04-09-2005, 12:30 PM   #3 (permalink)
Soon to be RICHdoggie!
 
PoorDoggie's Avatar
Join Date: Jan 2005
Location: UK
Posts: 2,408
PoorDoggie is just really nicePoorDoggie is just really nicePoorDoggie is just really nicePoorDoggie is just really nicePoorDoggie is just really nicePoorDoggie is just really nicePoorDoggie is just really nicePoorDoggie is just really nice
 



Originally Posted by adamquaile
There is a solution, it requires PHP...

Anyway, here goes...

Type this code for your link:

HTML Code:
<?php
$page = $_SERVER["PHP_SELF"];

echo "<a href=\"email.php?page=";
echo $page;
echo "\">Visible link text/img</a>";

?>
Then on your second email page just have something like this:

HTML Code:
<?
if (!isset($page))
{
/*show some error message*/
}
else
{
$subject = "$recipient has suggested a site";
mail($to, $subject, $message, $mailheaders);
}

?>
You also need a form so the user can type in their email, and other things...


Hope this helps, but if it doesn't let me know...

that won't work, because the page that steve wants to send to a friend is:
http://www.safetyvideodirect.com/pro...atalogID=10009
and already as a query string, therefore won't work.

I can give you a rough script, but it is PHP again! sorry!

THIS GOES ON THE PRODUCT VIEW PAGE - REGARDLESS OF THE PRODUCT ON DISPLAY
PHP Code:
<?php
$page 
$_SERVER['PHP_SELF'];
?>
<form method="post" action="email.php">
<!-- this is the hidden box where we put the page details -->
<input type="hidden" name="page" value="<?php echo $page?>" />
<!-- this is the box for the sender's name -->
Name: <input type="text" name="name" /><br />
<!-- this is the box for the recipient's email -->
Recipient: <input type="text" name="email" /><br />
<!-- submit button -->
<input type="submit">
</form>
THIS IS ON email.php
PHP Code:
<?php
????: NamePros.com http://www.namepros.com/showthread.php?t=74942
// get the variables
$page $_POST['page']; // page
$name $_POST['name']; // senders name
????: NamePros.com http://www.namepros.com/showthread.php?t=74942
$email $_POST['email']; // recipeint's email

// create a message
$message 'Your friend $name has reffered a product to you from COMPANY_NAME<br /><br /><a href="$page">Click Here to View</a>';

// mail the form
$mail mail$email"An email from COMPANY_NAME"$message );

// check it sent
if( !$mail ){
echo 
"Mail was not sent successfully";
}
?>
PoorDoggie is offline  
Old 04-09-2005, 11:09 PM   #4 (permalink)
Senior Member
Join Date: Apr 2005
Posts: 1,023
bhyraj is an unknown quantity at this point
 



this is right option good job
bhyraj is offline  
Old 04-09-2005, 11:38 PM   #5 (permalink)
NamePros Regular
Join Date: Feb 2005
Posts: 345
dabb is on a distinguished road
 



Check out http://www.tafmaster.com/

I've never used it and don't really know much about their service, but I remembered seeing this site a few days ago when I saw your post.
dabb is offline  
Closed Thread


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Page Rank 5 Site with Banner and Text Links!! MUCH MORE! High Traffic Sites ebizcraftsman Advertising & SEO Services 0 12-09-2004 09:43 PM
Five-Day .INFO SALE - Part Five - 133 Domains Including StockResearch.info Duke Domains For Sale - Make Offer 0 03-31-2004 11:49 AM
Prices Slashed On Over 100 Names Near Expiration and We'll Add a Year for You! Duke Domains For Sale - Make Offer 3 03-03-2004 08:19 AM
Prime .INFO Sale - Part Five - 122 Domains Including StockResearch.info Duke Domains For Sale - Make Offer 2 02-22-2004 05:07 PM
How to add to a page shortcut to destop? Vlink Website Development 11 10-31-2003 01:57 AM

 
All times are GMT -7. The time now is 07:21 PM.

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