Author Topic: Emil forms  (Read 2286 times)

0 Members and 1 Guest are viewing this topic.

Offline Grausig

  • Newbie
  • *
  • Female
  • Posts: 2
    • http://grausig-vampyr.deviantart.com
Emil forms
« 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.





Offline Miles Feral

  • Jr. Member
  • **
  • Male
  • Posts: 77
    • http://sunshineotter.furtopia.org
Emil forms
« Reply #1 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!
</textarea>
<input type="submit" value="Email Miles">
</form>





"Every child is an artist. The problem is how to remain an artist once we grow up." --Pablo Picasso
SunshineOtter: A Whimsical Paradise -- My WebSite!
Sunshine Blog -- My Livejournal!

Offline Richard K Niner

  • Sr. Member
  • Indecision incarnate canine
  • ****
  • Male
  • Posts: 341
    • K9 Unit
Emil forms
« Reply #2 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).

Offline Miles Feral

  • Jr. Member
  • **
  • Male
  • Posts: 77
    • http://sunshineotter.furtopia.org
Emil forms
« Reply #3 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 =^__^=





"Every child is an artist. The problem is how to remain an artist once we grow up." --Pablo Picasso
SunshineOtter: A Whimsical Paradise -- My WebSite!
Sunshine Blog -- My Livejournal!