hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Programming Discussion : Form question
Reply

Forum Jump

Form question

Reply Post New Thread In Programming Discussion Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 04-19-2004, 10:25 PM
P10n33R P10n33R is offline
WHT 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



Sponsored Links
  #2  
Old 04-19-2004, 10:43 PM
P10n33R P10n33R is offline
WHT 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

  #3  
Old 04-19-2004, 11:12 PM
P10n33R P10n33R is offline
WHT 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.
Sponsored Links
  #4  
Old 04-20-2004, 03:08 AM
Burhan Burhan is offline
Community Guide
 
Join Date: Jul 2003
Location: Kuwait
Posts: 5,099
Without showing us the code, we can't help you

Paste the code here (use the php formatting tags if you want it highlighted).

__________________
In order to understand recursion, one must first understand recursion.
If you feel like it, you can read my blog
Signal > Noise

  #5  
Old 04-20-2004, 06:03 AM
Djoppa Djoppa is offline
Junior Guru Wannabe
 
Join Date: Apr 2004
Location: Nijmegen, Netherlands
Posts: 38
Does it work already??

www.magiceyes.nl

  #6  
Old 04-20-2004, 07:42 PM
P10n33R P10n33R is offline
WHT 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><class="style1">Booking
            
<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>              <class="style7">
            </
td></tr>
            <
tr><td colspan=2 align=center><input type="submit" value="Submit" name="submit"></td></tr>
        </
table
action.php

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.

  #7  
Old 04-20-2004, 08:11 PM
ilyash ilyash is offline
Web Hosting Master
 
Join Date: Dec 2002
Location: NY, NY
Posts: 3,975
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); 
?>

  #8  
Old 04-20-2004, 08:14 PM
P10n33R P10n33R is offline
WHT Addict
 
Join Date: Apr 2004
Location: Ontario
Posts: 141
trying it as i type.

  #9  
Old 04-20-2004, 08:18 PM
P10n33R P10n33R is offline
WHT 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?

  #10  
Old 04-20-2004, 08:45 PM
pixd pixd is offline
Web Hosting Master
 
Join Date: May 2003
Posts: 598
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).

  #11  
Old 04-20-2004, 08:50 PM
pixd pixd is offline
Web Hosting Master
 
Join Date: May 2003
Posts: 598
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.
  #12  
Old 04-21-2004, 01:41 AM
Hassan Hassan is offline
Web Hosting Guru
 
Join Date: Dec 2003
Location: Pakistan
Posts: 260
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

  #13  
Old 04-21-2004, 03:38 AM
Burhan Burhan is offline
Community Guide
 
Join Date: Jul 2003
Location: Kuwait
Posts: 5,099
If none of those suggestions work, try phpmailer.

__________________
In order to understand recursion, one must first understand recursion.
If you feel like it, you can read my blog
Signal > Noise

  #14  
Old 04-21-2004, 07:02 PM
P10n33R P10n33R is offline
WHT 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.

  #15  
Old 04-21-2004, 07:38 PM
t3r0 t3r0 is offline
Junior 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...

Reply

Related posts from TheWhir.com
Title Type Date Posted
Introducing .HOST: The Exciting New gTLD for the Global Hosting Community Webinars 2014-09-11 13:44:36
Nominet Seeks Feedback on Banning Offensive .UK Domain Registrations Web Hosting News 2013-09-13 15:25:36
Lead Generation Part 2 – Content Syndication Blog 2012-12-12 12:37:59
Lead Generation Part 1 – Form Fills Blog 2012-11-16 09:03:48
Joomla Hosting Study Shows Speed, Uptime Top Selling Points of a Web Host Web Hosting News 2012-11-07 15:06:36


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:
WHT Membership
WHT Membership



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?