View Full Version : help code required for "tell a friend about my website" ?
souravsaha86
03-25-2006, 07:11 AM
i want to make a place in my website where if someone likes my website then he or she can directly invite his or her friend to hav a look at my website through my website. so i want direct email about my website to friend tye of thing. i want the invitation to be sent via email. so wat is the code for that? i think i couldnt find that in dynamic drive:confused:
djr33
03-25-2006, 11:31 AM
You can use a generic PHP script for this. You'll need php support and it might get complex with permissions for the mail files and such.
There are plenty of tutorials on this.... you can probably just cut and paste.
Look up using forms and then using php to interpret them.... it's kinda complex, but you can figure it out.
I don't know of any other way for this to work without another coding language... maybe ASP, certainly CGI.
I don't think JS will do it.
The other route is to use a free form sender.
What you'll do is make your form like this:
<form action="FREESITEURL">
<...>
</form>
and then it should just be interpreted.
Google it, and then look at their invidual info.
Note that some will have the email show up with weird info, like the IP address of the person who sent it or an ad for the free form. Check it out to be sure the formatting is ok with you before making it public. You can't customize too much with free form senders... which is why it's kinda better to write your own if you can.
And... actually, I just remembered you can use the 'action' of the form to be a 'mailto:e@mail.com' address, but that'll just use the program of the user and not all users have that setup correctly. It might also be complex to get working without bugs. I dunno.
hope this gets you started...
souravsaha86
03-26-2006, 03:29 AM
dint understand too much. it went over my head. plz i am not a rocket scientist. plz explain me little easily? i mean, i havent posted my website anywhere. but i will go for a free domain. so is it possible for a stuff like "email to a friend to join this website"? or will it be only ossible only wen i buy space on internet? can someone help me personally in this area? plz? i will b very happy sud this work. this can increase the popularity of a website. thats how google became a superpower today. anyone s help to me in this subject is highly welcome. thanks, sourav, kolkata, INDIA
djr33
03-26-2006, 07:17 AM
Alright, no problem.
PHP and the others are programming languages that you could possibly use to program this. However, 'cause it sounds like you don't want to get into complex coding...
Well... my other explanation was kinda detailed, so what I can do is just tell you that what you need is called a form. A form is ANYTHING the user can input text into or use checkboxes, dropdown lists, etc etc.
What happens is that each 'field' in the form gets assigned a value... the user input. They might type in 'joesmith' for a username... that's a value that will be interpreted when the form is sent.
Anyway, you get all the values put in there, like the comment, friend's email, etc. And then they click the send button.
That send button acts kinda like a link, but a special one. The data is sent to the next page along with the browser. So... the 'action' of the form is where the send button goes.
When the user clicks the send button, the go to the new page and that new page 'does stuff' with the values from the form.
Follow so far?
Ok... so... what you've gotta do is figure out how to get that next page working... coding the form itself is easy... lots of info around about that.
You've made it clear you don't want to do it yourself, so you better use one that's already working.
So... use google.com to find a 'free form interpreter' or 'free form service' or something like that.
There will be instructions on that page.
It'll tell you how to setup your form on the page, then what URL to set the form's 'action' to so that it'll do the complex stuff for you, so you don't need to.
Get it now?
If not, I can rephrase. But, tell me what part's confusing.
souravsaha86
03-26-2006, 09:19 AM
hey i understood ur last explanation. that was quite easy mate. thanks for help buddy. but even at the end of it all i cant get the codeing and stuffs correctly even with the help of google also. i hav uploaded my html document till now. plz if u can try and help me by making those "Tell A Friend" buttons work .. i hav got some codeing of it. but its not working. it would be really helpful if someone cud check this out. this is my 15kb html document till now.
http://rapidshare.de/files/16449023/hello.html.html
its wud be highly appreciated if some one helps me. thanks, sourav
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.