By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,963 Members | 1,276 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,963 IT Pros & Developers. It's quick & easy.

Form Help Again

P: n/a
Here is my form.
<form action="http://www.johndoe.com/FormToEmail.php" method="post"
enctype="multipart/form-data">
<input class="sidebar" value="name" name="user" >
<input class="sidebar" value="email" name="email" > <TEXTAREA
class=sidebar name=content rows=40 cols=30></TEXTAREA>
<input class="button_sidebar" value="Send" type="submit" >
<input class="button_sidebar" value="Reset" type="reset" >
</form>

I then have a PHP file called FormToEmail.php
It looks like this:
$my_email = "jo*****@aol.com";


And some other garbage at the bottom. For some reason my form goes to
the FormToEmail.php page, but I never get any emails with the data.
Can anyone help me with this.
- John.
Jun 25 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
In article <s0********************************@4ax.com>,
Hoopster <ho*************@aol.com> wrote:
Here is my form.
<form action="http://www.johndoe.com/FormToEmail.php" method="post"
enctype="multipart/form-data">
<input class="sidebar" value="name" name="user" >
<input class="sidebar" value="email" name="email" > <TEXTAREA
class=sidebar name=content rows=40 cols=30></TEXTAREA>
<input class="button_sidebar" value="Send" type="submit" >
<input class="button_sidebar" value="Reset" type="reset" >
</form>

I then have a PHP file called FormToEmail.php
It looks like this:
$my_email = "jo*****@aol.com";


And some other garbage at the bottom. For some reason my form goes to
the FormToEmail.php page, but I never get any emails with the data.


If you wish to send mail, you have to actually *WRITE CODE* to *SEND
THE MAIL*. Often this is a call to the PHP mail() function, or
invoking classes to send mail. All the above does is set an unused
variable.

Some security tips:

Never let the PHP use user-supplied or form-supplied values (stuff
from $_GET[], $_POST[], etc.) for mail headers (e.g. Subject:, To:,
From:, etc.) without first ensuring that the value does NOT contain
a carriage return or line feed. Never let the user or form specify
the destination of the email.

Gordon L. Burditt
Jun 25 '06 #2

P: n/a
Carved in mystic runes upon the very living rock, the last words of
Hoopster of comp.lang.php make plain:
Can anyone help me with this.


Yep - try Phorm.

--
Alan Little
Phorm PHP Form Processor
http://www.phorm.com/
Jun 25 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.