|
|
#1 |
|
Daemon Poster
Join Date: May 2009
Posts: 690
|
I am trying to put an Email Form on my web site the kind that you would fillout and then Hit submit and it will Automaticly e mail it to me.
But all I come across is forms that you need to have some kind of .PhP File put in your CGi Bin and then code your page. And I tryed it and the Form never comes up right on my page and it never e mails it to me. Then I see all over the net that this kind of Email Form never realy works. So does anyone know of a way I can maybe do it by hand with HTML Code and not have to use all this ather Files and CGi Bins???? Thanks |
|
|
|
|
|
#2 |
|
Fully Optimized
Join Date: Oct 2008
Posts: 2,345
|
Php is a program you will run on a server.
It allows you to code in Php code Code:
<?php ?> Php 5 Securing Php Php email form
__________________
Everyone's Favorite Turd xD ET: "Phone home!" Geek: "ping 127.0.0.1" "If that guy knew half the $h*t that I know, his fuzzy little head would explode. " - Matthew Farrell |
|
|
|
|
|
#3 |
|
Daemon Poster
|
Truth be told you will need to have some type of action script for a form to really function well. You don't need a very complicated script for the form to work.
If you give me some information on what exactly you are looking for I can try and put together something that will work for you. Cheers!
__________________
LEARN BY DOING NOT BY FOLLOWING DIRECTIONS! Linux Forever! I thought you were a hispanic/african american? Who is the white guy in the pictures? |
|
|
|
|
|
#4 |
|
Daemon Poster
Join Date: May 2009
Posts: 690
|
I just want a Form that has a Box to type their Name in.
And a box to type their Masssage in. Then they will hit submit and it will e mail it to me by it'self. And I don't know how to put up a picture?? |
|
|
|
|
|
#5 |
|
Daemon Poster
|
Hi,
Ok, give me a day or so and I will put something together for you. It might not be exactly what you want but I will give you a template for you. I will make the php script work for you reguardless of how you change the form. Cheers!
__________________
LEARN BY DOING NOT BY FOLLOWING DIRECTIONS! Linux Forever! I thought you were a hispanic/african american? Who is the white guy in the pictures? |
|
|
|
|
|
#6 |
|
Golden Master
Join Date: Feb 2005
Location: usa
Posts: 6,417
|
What software for your website are you using? Sounds a little like VB's Contact Us which appears at the bottom of the main index page.
That can get hit by spammers if it's not protected by a human challenge like re-captcha or something like it. Also you might check over at www.dynamicdrive.com and see if they have something already put together that would work.
__________________
animeappeal.com is offline due to hosting issues. Hopefully I'll have it back up soon. Stay tuned... |
|
|
|
|
|
#7 |
|
Daemon Poster
|
Hi,
Here is what I have for the form so far. I think that it should work, I am just working on the php now. Code:
<form action="email.php" method="post"> <p>Your name: <input type="text" name="name" /></p> <p>Message:<br /> <textarea name="message" rows="25" cols="50"></textarea><br/> <input type="submit" /> </form>
__________________
LEARN BY DOING NOT BY FOLLOWING DIRECTIONS! Linux Forever! I thought you were a hispanic/african american? Who is the white guy in the pictures? |
|
|
|
|
|
#8 |
|
In Runtime
|
wmorri is spot on for the form. When you set the form's method to post, the inputs are posted back to the server. The code in your email.php file would look like this:
PHP Code:
It sends two e-mails. One to the user letting them know you received their submission, and one to you informing you that you received one. the headers (content-type) allows you to put html in the e-mail instead of plain text. the built-in "mail" function I used returns 1 on success and false on failure. You could put this in an if statement to check and see if the operation completed. Hope this helps. Also notice the $_POST[] variable. This is a global variable that exists on every post back to the server. It is an array whose contents are the form values that were posted back. The 'text' part that goes in the square braces corresponds to the name="" attribute of your input element in your form. So $_POST['name'] in your case, pulls whatever value they entered into the <input type="text"> field where it's name="" attribute equals "name". In wmorri's code: Code:
<input type="text" name="name" />
__________________
**Official Self-proclaimed glorified excessive (insert additional adjectives here) post editor/modifier. Edit = Best feature ever http://www.twitter.com/xDaevax |
|
|
|
|
|
#9 |
|
Daemon Poster
|
Daeva,
Thanks for doing the php part for me. I am not to good with php yet. I usually have some friends that help me with that. Cheers!
__________________
LEARN BY DOING NOT BY FOLLOWING DIRECTIONS! Linux Forever! I thought you were a hispanic/african american? Who is the white guy in the pictures? |
|
|
|
|
|
#10 |
|
Daemon Poster
Join Date: May 2009
Posts: 690
|
Can we go step by step because these thingsa never work for me.
So I just want to make sure I am doing it right?? Everything in the PhP File you have listed I type say in Notepad and save it as . PhP right?? What do I have to Ad Or Change?? Just tell me this first. Thanks. |
|
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|