PHP Form Mail Help
Posted: Sat May 26, 2007 11:33 am
Ok, so I found a tutorial for a PHP form mailer, here.
And it didn't work. So I'll post exactly what I posted there. Nobody has answered me, though. So, I thought maybe I'd get some more help here.
Ok, I'm trying to make three forms.
The first is a song request (this is for an online radio), in which I just want it to send an email to my friend. It is here.
As you can see, it's not exactly working. Theres an error.
request.php:
So, it's told to go to songrequest.php:
And then theres the Contact Us page. I want 2 forms; one for website help, and one for radio help. I just want name, email, and comments for both of them. It's here. Yes, another error. Similar to the other.
contact.php Website Form:
contact.php Radio Form:
And they point towards two different files; radiocontact.php:
...and websitecontact.php:
I'd just like to say that I'm not a very experience PHP'er. In fact, I have VERY little knowledge. I'm a copy/paste type person. Anyways, got any ideas? I appreciate it a whole bunch.
Thanks guys
And it didn't work. So I'll post exactly what I posted there. Nobody has answered me, though. So, I thought maybe I'd get some more help here.
Ok, I'm trying to make three forms.
The first is a song request (this is for an online radio), in which I just want it to send an email to my friend. It is here.
As you can see, it's not exactly working. Theres an error.
request.php:
Code: Select all
<? else
{?>
<form method="post" action="songrequest.php">
<b>Name:</b> <INPUT TYPE="TEXT" NAME="name" size=60><br>
<b>Song:</b>
<INPUT TYPE="TEXT" NAME="song" size=60>
<p align="center"><input type="submit" name="submit" value="submit">
<input type="reset" name="clear" value="clear"></p>
</form>
<? }?>Code: Select all
<? //initilize PHP
if($submit) //If submit is hit
{
mail("[b]email removed for privacy[/b]", "$name", "$song");
}?>
Thank you! <a href="index.php">Click here</a> to go back to Revolution Radio.And then theres the Contact Us page. I want 2 forms; one for website help, and one for radio help. I just want name, email, and comments for both of them. It's here. Yes, another error. Similar to the other.
contact.php Website Form:
Code: Select all
<? else
{?>
<form method="post" action="websitecontact.php">
<b>Name:</b> <INPUT TYPE="TEXT" NAME="name" size=60><br>
<b>E-mail:</b>
<INPUT TYPE="TEXT" NAME="email" size=60><br>
<b>Comments:</b> <TEXTAREA NAME="comments" ROWS=10 COLS=30></TEXTAREA>
<p align="center"><input type="submit" name="submit" value="submit">
<input type="reset" name="clear" value="clear"></p>
</form>
<? }?>Code: Select all
<? else
{?>
<form method="post" action="radiocontact.php">
<b>Name:</b> <INPUT TYPE="TEXT" NAME="name" size=60><br>
<b>E-mail:</b>
<INPUT TYPE="TEXT" NAME="email" size=60><br>
<b>Comments:</b> <TEXTAREA NAME="comments" ROWS=10 COLS=30></TEXTAREA>
<p align="center"><input type="submit" name="submit" value="submit">
<input type="reset" name="clear" value="clear"></p>
</form>
<? }?>Code: Select all
<? //initilize PHP
if($submit) //If submit is hit
{
mail("[b]email removed for privacy[/b]", "$name", "$comments" , "$email");
}?>
Thank you!
<a href="index.php">Click here</a> to go back to Revolution Radio.Code: Select all
<? //initilize PHP
if($submit) //If submit is hit
{
mail("[b]email removed for privacy[/b]", "$name", "$comments" , "$email");
}?>
Thank you!
<a href="index.php">Click here</a> to go back to Revolution Radio.I'd just like to say that I'm not a very experience PHP'er. In fact, I have VERY little knowledge. I'm a copy/paste type person. Anyways, got any ideas? I appreciate it a whole bunch.
Thanks guys