Results 1 to 18 of 18
Thread: Form question
-
04-19-2004, 10:25 PM #1WHT Addict
- Join Date
- Apr 2004
- Location
- Ontario
- Posts
- 141
Form question
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
-
04-19-2004, 10:43 PM #2WHT Addict
- Join Date
- Apr 2004
- Location
- Ontario
- Posts
- 141
ok, I got it wroking more or less but i am getting a parse error. Dammit
-
04-19-2004, 11:12 PM #3WHT Addict
- Join Date
- Apr 2004
- Location
- Ontario
- Posts
- 141
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.Last edited by P10n33R; 04-19-2004 at 11:20 PM.
-
04-20-2004, 03:08 AM #4Web Hosting Master
- Join Date
- Jul 2003
- Location
- Kuwait
- Posts
- 5,104
Without showing us the code, we can't help you
Paste the code here (use the php formatting tags if you want it highlighted).
-
04-20-2004, 06:03 AM #5Junior Guru Wannabe
- Join Date
- Apr 2004
- Location
- Nijmegen, Netherlands
- Posts
- 38
Does it work already??
www.magiceyes.nl
-
04-20-2004, 07:42 PM #6WHT Addict
- Join Date
- Apr 2004
- Location
- Ontario
- Posts
- 141
PHP 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.
-
04-20-2004, 08:11 PM #7Web Hosting Master
- Join Date
- Dec 2002
- Location
- NY, NY
- Posts
- 3,974
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); ?>
webmaster A T 420th.com
What is my Itunes playing? Visit 420th.com/nowplaying.jsp to find out.
Ask the monkey: http://www.monkeyfaq.com
-
04-20-2004, 08:14 PM #8WHT Addict
- Join Date
- Apr 2004
- Location
- Ontario
- Posts
- 141
trying it as i type.
-
04-20-2004, 08:18 PM #9WHT Addict
- Join Date
- Apr 2004
- Location
- Ontario
- Posts
- 141
Well that didn't work. Does anyone have one they know works that i can test?
-
04-20-2004, 08:45 PM #10Web Hosting Master
- Join Date
- May 2003
- Posts
- 599
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).
-
04-20-2004, 08:50 PM #11Web Hosting Master
- Join Date
- May 2003
- Posts
- 599
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.Last edited by pixd; 04-20-2004 at 08:55 PM.
-
04-21-2004, 01:41 AM #12Web Hosting Guru
- Join Date
- Dec 2003
- Location
- Pakistan
- Posts
- 278
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
-
04-21-2004, 03:38 AM #13Web Hosting Master
- Join Date
- Jul 2003
- Location
- Kuwait
- Posts
- 5,104
If none of those suggestions work, try phpmailer.
-
04-21-2004, 07:02 PM #14WHT Addict
- Join Date
- Apr 2004
- Location
- Ontario
- Posts
- 141
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.
-
04-21-2004, 07:38 PM #15Junior Guru Wannabe
- Join Date
- Nov 2002
- Location
- Finland
- Posts
- 96
I think Hotmail blocking emails sent by servers without Reverse DNS....
Contact your host and ask about this...
-
04-21-2004, 08:39 PM #16WHT Addict
- Join Date
- Apr 2004
- Location
- Ontario
- Posts
- 141
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.
-
04-22-2004, 12:22 AM #17Web Hosting Guru
- Join Date
- Dec 2003
- Location
- Pakistan
- Posts
- 278
Originally posted by fyrestrtr
If none of those suggestions work, try phpmailer.
Check Junk mail folder also.
-
04-22-2004, 07:41 AM #18WHT Addict
- Join Date
- Apr 2004
- Location
- Ontario
- Posts
- 141
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.