looking 4 script

They have: 83 posts

Joined: Apr 2004

i want to put a tell a friend box on my site like the one found here http://www.cgi-network.net/links7/tell_friend.php?id=7409 but because i'm too inexperianced to do 1 up myself i've been looking for one. do u know a good 1 that i could use?

Busy's picture

He has: 6,151 posts

Joined: May 2001

tell a friend script is a pretty easy script to make, basically just an email form but to someone else and maybe perset message and subject line.
This is your perfect chance to make it yourself. Its something you need, isn't hard to do and doing it yourself will lead to more experience and bragging rights ...

davidjaymz's picture

He has: 193 posts

Joined: Jul 2001

I had a search round the net and although i found a number of sites listing such scripts all the actual scripts were missing...

Busy how would we go about writing such a script?

DJ

DJ

Busy's picture

He has: 6,151 posts

Joined: May 2001

Think about it for a sec, what do you think you need?

You need a form to display the bits (html)
you need some checks (validation) to make sure the email addresses are valid
there are other checks you can make as well (strip html/script tags from subject and message etc), but one to be sure to include which most free scripts don't include is to make sure the form input is coming from your site.
then if everything is ok use the php mail function to send it (or whatever server side language you choose).

google.com and php.net (the manual) are your friends

have a go, if you get stuck post back and we'll help, if we do it for you, you wont learn.
Your homework tonight ... lol *love saying that*
make an email form where people can email you first of all, then change the to you portion to the person they choose.

They have: 83 posts

Joined: Apr 2004

Alright, I don't know much javascript, but I'll give it a try.

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

JAVASCRIPT!? No!!

This is NOT a JavaScript application. You need server-side scripting.

They have: 83 posts

Joined: Apr 2004

uh oh... thats not good. I don't know any server side scripting.
Are you sure it can't be done in javascript? I've almost got it done and I'm using javascript and I think I've seen it done with javascript before.

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

... not like the one you showed us.

Sure you can have an email sent, but you could do that with a straight form and HTML. You won't have tracking, you won't have any control, error checking...

They have: 83 posts

Joined: Apr 2004

yea, I was wondering how I was to do checks in javascript. I'd do it in perl or some other server-side scripting, but i don't know anything about server side scripting. Do u know a site where i can download a "tell a friend script" or where i can learn some server-side scripting?

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

I misspoke earlier, you can and should use JavaScript for most error checking, however JavaScript can't verify email addresses or record the information in a database, et cetera.

http://www.hotscripts.com/CGI_and_Perl/Scripts_and_Programs/Site_Recommendation/
http://www.hotscripts.com/PHP/Scripts_and_Programs/Site_Recommendation/index.html

And for learning a server-side language, pick one and we can give you links.

They have: 83 posts

Joined: Apr 2004

i'll try and learn PHP. Can you give me a link?

They have: 83 posts

Joined: Apr 2004

UNBELIEVABLE

My crappy free web host doesn't support PHP (I guess ya really do get what ya pay for). Still thats just sad that they don't. I mean it's free and all and it doesn't take up that much server resources to have ppl using PHP. This webhost has been trying my patience since i decided to use it on the recomendation of a friend. I'm really considering not being so cheap and getting some real hosting. Do ya think I should even though my site is non-commercial?

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

Why not install php on your own computer and learn it there? Then you can decide if it's worth it?

They have: 83 posts

Joined: Apr 2004

good idea. thats just what I'll do. heading over to php.net to download it now.

Busy's picture

He has: 6,151 posts

Joined: May 2001

you'll need mysql and apache as well firepages.com.au has the bundle or plently of other places have them too. You can use windows as the server but not many hosts do so yo wont have the same limits, better to use close as possible as your would be host can offer.

He has: 1,758 posts

Joined: Jul 2002

If your looking for a free local webserver to run on a windows machine, try abyss webserver. It's free and supports PHP, MySQL and Perl. You can download it free from:

http://www.aprelium.com/abyssws/ Smiling

Andy

They have: 83 posts

Joined: Apr 2004

Thanks...I just downloaded the software

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.