I have made a form but I dont know how to make it email me the information. Can someone help me?
www.s93629411.onlinehome.us/FE/booking.html
Printable View
I have made a form but I dont know how to make it email me the information. Can someone help me?
www.s93629411.onlinehome.us/FE/booking.html
ok, I got it wroking more or less but i am getting a parse error. Dammit
Does anyone know why it isnt working or can some one post me one that works. I am very very new to PHP.
Edit[] Edit worked for the first time. The mailer worked once out of the like 15 times i tried it.
Without showing us the code, we can't help you :)
Paste the code here (use the php formatting tags if you want it highlighted).
Does it work already??
www.magiceyes.nl
action.phpPHP Code:
<form method="post" action="action.php">
<input type="hidden" name="required" value="email,realname">
<table cellpadding="0" cellspacing="0" border="0" align=center>
<tr class="style3"><td colspan=2 align=center><p class="style1">Booking
<p class="style7"></td></tr>
<tr class="style6">
<td><div align="right"><span class="style2">Your E-Mail:</span></div></td>
<td><input name="email" type="Text" size=30></td></tr>
<tr class="style6">
<td><div align="right"><span class="style2">Your Name:</span></div></td>
<td><input name="realname" type="Text" size=30></td></tr>
<tr class="style6">
<td><div align="right"><span class="style2">Subject:</span></div></td>
<td><input name="subject" type="Text" size=30></td></tr>
<tr class="style6"><td colspan=2> <span class="style2">Message:</span><span class="style7"><br>
<textarea name=message cols=40 rows=10></textarea>
</span> <p class="style7">
</td></tr>
<tr><td colspan=2 align=center><input type="submit" value="Submit" name="submit"></td></tr>
</table>
PHP Code:
<?php
$name = $_POST['name'];
$email = $_POST['email'];
$subject = $_POST['subject'];
$message = $_POST['message'];
$my_email = "mjyuke@bmts.com";
$headers .= "From: $name <$email>\r\n";
$headers .= "Content-Type: text/plain; charset=iso-8859-1\r\n";
mail($my_email, $subject, $message, $headers);
?>
Some code I put together using a few different scripts.
try this:
Code:<?php
$name = $_POST['realname'];
$email = $_POST['email'];
$subject = $_POST['subject'];
$message = $_POST['message'];
$my_email = "mjyuke@bmts.com";
$headers .= "From: $name <$email>\r\n";
$headers .= "Content-Type: text/plain; charset=iso-8859-1\r\n";
mail($my_email, $subject, $message, $headers);
?>
trying it as i type.
Well that didn't work. Does anyone have one they know works that i can test?
I just tested your code (unaltered) on my server and it worked fine 10/10 times. It's most likely a problem on your server's end. I can't really offer much more information then that (because I don't really know what it could be).
Here's my support contact form code, it's a little hairy, but if you know what you're doing you should be able to source a working system.
http://www.pixd.com/support.phps
(view source if you don't see code, my server's a little wonky with phps files right now)
Good Luck, it's all I can really offer ya.
Try this :
<?php
$realname = $HTTP_POST_VARS[realname];
$email = $HTTP_POST_VARS[email];
$subject = $HTTP_POST_VARS[subject];
$message = $HTTP_POST_VARS[message];
$msg = "Real Name:\t$realname\n";
$msg .= "E-mail:\t$email\n";
$msg .= "Message:\t$message\n";
mail("you@urhost.com", "$subject", "$msg", "From: $realname<$email>");
echo "<H1 align=center>Thank You, $realname</H1>";
echo "<P align=center>We will contact you shortly</p>";
?>
Pretty Script by me :)
If none of those suggestions work, try phpmailer.
ok.
I can get an email from almost any email address except for hotmail. does anyone know why? It is starting to piss me off.
I think Hotmail blocking emails sent by servers without Reverse DNS....
Contact your host and ask about this...
i think it is because I am using 1and1s free service to test my sites and host some small ones. When this site goes live (in a while, company hasn't even started yet) they will have a paid server so I will make sure they have reverse DNS. so thanks for all of your help.
Quote:
Check Junk mail folder also.
I need to edit the php so i can get it to email to two email addresses. But I will gone foe a few days to a film festival. Thanks for all the help guys and talk to you later.