Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Quick & easy way to create an "email this page" to someone link?

Tags:

html

php

Is there a quick way to create a link that when clicked will allow the user to send the link of the page they're on via mailto?

like image 767
Rob Avatar asked May 14 '12 10:05

Rob


People also ask

What is the synonym of quick?

abrupt, active, agile, brief, brisk, cursory, energetic, expeditious, hasty, hurried, immediate, instantaneous, keen, nimble, rapid, sudden, swift, able, deft, effective.

Is Quick Same as fast?

Fast and quick mean moving with great speed. Fast is both an adjective and an adverb. Quick is an adjective and the adverb form is quickly. It was a fast train.

What is Quick used for?

Quick is an adjective and the adverb form is quickly. … used for telling someone to do something quickly: Quick! Close the door before the cat comes in!

What is the verb of quick?

Verb. quick (third-person singular simple present quicks, present participle quicking, simple past and past participle quicked)


1 Answers

To send the link of the page you are exactly on try to use the following code:

<a HREF="mailto:?subject=look at this website&body=Hi,I found this website
and thought you might like it <?php
$url="http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
echo $url;
?>">Tell a friend!</a>

The php will get the url of the page you are currently on.

like image 66
Badger Cat Avatar answered Nov 07 '22 07:11

Badger Cat