Furtopia | Family Friendly Furry Forum and IRC Chat!

the basement => the archives => web design support => Topic started by: Grausig on September 14, 2006, 02:44:32 pm

Title: Emil forms
Post by: Grausig on September 14, 2006, 02:44:32 pm
[EDIT] The topic was suposed to say "Email Forms".  I type too fast...[/EDIT]

I am trying set up a form so that visitors of my site can fill it in and it gets sent to straight my email.  I couldn't get PHP to work at all.  I've got an HTML book here that says something about needing a program and command that I can only get from my server... I have no clue what it means, some website or something <FORM ACTION="..that goes here.." METHOD="POST">

Any help or tips will be greatly appreciated.

Title: Emil forms
Post by: Miles Feral on September 14, 2006, 02:55:13 pm
I dunno if you mean you want a form on the page itself that people can type into, or a specific type of link, but I think I have the solution for both !

This is one way, even though I think you're looking for the type-in form. This version is a hyperlink which will open the mail program of the person's computer, but automatically type in your address along with a body and subject if you want it!

<a href= "mailto:milesferal@gmail.com?subject=Mail from a Friend!&body=I'm mailing YOU, hun!" >
Email Me</a>

Here's the second with a form!

<form method="post" action="mailto:milesferal@gmail.com">
<textarea rows="5" cols="20" wrap="physical" name="comments">
Enter Message Here!
<input type="submit" value="Email Miles">

Title: Emil forms
Post by: Richard K Niner on September 14, 2006, 03:34:37 pm
I think the version of the e-mail form that book is referring to is of the variety that hides your address from potential spammers.

Miles:  I'm not so sure your form solution works properly - in fact, it throws errors on most browsers: here's a good explanation of why, and a bunch of examples.

Grausig:  If you want to go with a form-based solution, PHP provides the mail function.  It accepts the to address, subject line, message body, and any additional headers (like "From:").  The subject, message body, and from address can be pulled from the $_POST array, after the form is submitted.  If the mail() function doesn't work, though, you will have to implement your own MTA (mail transfer agent) to send the message  (hint:  look up the fsockopen function for this).
Title: Emil forms
Post by: Miles Feral on September 14, 2006, 03:48:22 pm
It is a simplistic way of doing things, but she mentioned HTML, so I assumed that was what she new best (not that I know much else either)

Anyway, I've never really had any problems with the functions-- they do what they're supposed to, but that's it. There are also simple ways to use mailto while hiding the email address behind it so bots (generally) can't see it, though, I've never had problems with those either, whether protected or not.

If none of our suggestions work for you, remember that you've got the whole of the internet at your paws! Vigilance in searching will surely find you what you need =^__^=