FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Form Mail Help Needed





mtorregiani
Hi

I have this page but the php script don't work, just try it...

Can anyone help me?



Thanks
DudeAmI0
Here is a script i wiped up for you.

Code:

<?php
if (isset($_POST['send']) && isset($_POST['name']) && isset($_POST['message']) && isset($_POST['email'])) {
  /* Send message */
    mail('YOUR MAIL HERE', 'Message from '.$_POST['name'], $_POST['message']);
    echo 'You have sent the message';
} else if (isset($_POST['send']) || isset($_POST['name']) || isset($_POST['message']) || isset($_POST['email'])) {
  /* If they forget some info */
  echo 'You forgot to enter some info, please go back!';
} else {
  /* Display form */
  echo "<form action=".$_SERVER['PHP_SELF']." method=post><table border=0>
  <tr><td>Name:</td><td><input name=name type=text></td></tr>
  <tr><td>Your Email:</td><td><input name=email type=text></td></tr>
  <tr><td>Message:</td><td><textarea name=message cols=50 rows=5></textarea></td></tr>
  <td><td colspan=2><input name=send type=submit></td></tr>
  </table></form>";
}


I think that will send you a email, but replace the YOUR MAIL HERE with your email, and modifie all you want
mtorregiani
It's bad too
Check now...
DudeAmI0
Can i see you php script, ill see if i can fix it up. Also is my code on line 61?

EDIT: I dunno why it gives that mail() error... it says need to fix ini...
bladesage
mtorregiani wrote:
Hi

I have this page but the php script don't work, just try it...

Can anyone help me?



Thanks


Okay, the script is not working, which I know is very obvious.

We'll need the source code for the PHP file itself, just paste it in some [code] tags. To figure out the problem, we need to see the cause. Either that, or I'll need the names of the inputs and e-mail address to make you a new script.
yjwong
DudeAmI0 wrote:

EDIT: I dunno why it gives that mail() error... it says need to fix ini...


You need to specify the path to the sendmail binary in your computer in php.ini. If you are using a Windows system, you might need an external sendmail software.

If you want to send mail without installing the sendmail binary, you can check out this: http://phpmailer.sourceforge.net
Related topics
PHP: Feedback form issues.. help =P
form mail for php
A Simple Form Mail in PHP
html form help needed
Wordpess help needed.
Looking for easy FormMail Script
Smf help needed
Please Help? CGI form mail on my site... only 2 questions!
Help needed about this contact CGI file
Uplaoding images using php form :::: Help needed
Mail() Help
form mail problems (quality help=frih$)
Form Mail help........lol
Big Help needed .
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.