View Full Version : forms help
I need a form to email me the contents of the form. I've tried dynaform and a lot of other premade scripts, but in the editing process i screw something up and it doesnt work right, or i just don't understand it at all. I've even made my own form pages, they would open up outlook express to email it, i dont want that. i just want a simple "submit" and get on with other things. i know it exists, i just can't find out how to code it right. If anybody could help me out, it would be greatly appreciated.
<for instance, you could write me a basic code that did this, and give me simple instructions of editing it>
thanks a ton.
reid315
12-10-2004, 01:56 AM
to save you some time, just search here in HM. there are tons of replies of the same problem, so i'm sure you cant miss it.
just post the code here if you want; we'll take a look at it.
undacuvabruva
12-10-2004, 03:36 AM
dyna-form worked best for me
I had the same problem
chilipie
12-10-2004, 02:34 PM
http://www.hostmatrix.org/forum/index.php?showtopic=2005
A simple PHP form I showed someone else.
Originally posted by chilipie@Dec 10 2004, 10:34 AM
http://www.hostmatrix.org/forum/index.php?showtopic=2005
A simple PHP form I showed someone else.
16890
i edited it how i needed it to be, and it works, but i dont get the email.
heres the "contact.htm":
<html><style type="text/css">
<!--
body {
background-color: #406C94;
}
body,td,th {
color: FFFFFF;
}
a:link {
color: FFFFFF;
}
a:visited {
color: FFFFFF;
}
a:hover {
color: FFFFFF;
}
a:active {
color: FFFFFF;
}
-->
</style>
<body>
<form action="contactprocess.php" method="get">
<div align="center">
Name:<br>
<INPUT TYPE="text" NAME="Name" SIZE="30">
<br>
<br>
E-Mail:<br>
<INPUT TYPE="text" NAME="Email" SIZE="30">
<br>
<br>
Topic:<br>
<INPUT TYPE="text" NAME="Subject" SIZE="30">
<br>
<br>
Submission:<br>
<textarea NAME="Message" cols="40" rows="10">
</textarea>
<br>
<br>
<INPUT TYPE="submit" value="Submit">
<INPUT TYPE="reset">
</div>
</FORM>
heres the contactprocess.php:
<?php
error_reporting(o);
if(!empty($_GET['Name']) and !empty($_GET['Email']) and !empty($_GET['Subject']) and !empty($_GET['Message']))
{
mail("myemail@hotmail.com",$_GET['Subject'],$_GET[ 'Message'],"From:(".$_GET['Name'].">".$_GET['Email ']) or die("Mail() Failed.");
header("refresh: 0; url=contactdone.htm");
}
else
{
die("Please check you filled in all of the form fields.");
}
?>
heres the contactdone.htm
<html><style type="text/css">
<!--
body {
background-color: #406C94;
}
body,td,th {
color: FFFFFF;
}
a:link {
color: FFFFFF;
}
a:visited {
color: FFFFFF;
}
a:hover {
color: FFFFFF;
}
a:active {
color: FFFFFF;
}
-->
</style>
<body>
<p align="center"><br><br> Thanks for your submission!<br><br>
<a href="tutorials.htm">Return to Tutorials</a>
<a href="scripts.htm">Return to Scripts</a>
obviously, the myemail@hotmail.com isn't what is on the actual page, i just changed it for this purpose. what's wrong with the code? i don't recieve any email, but the form submits and you end up at contactdone.htm
any help greatly appreciated.
Check to make sure it doesn't end up in your spam folder. Hotmail (if that's what you're using) likes to take useful email and throw them away.
well, i checked my junkmail today after i re-did the form. it turns out that i've been getting them in my junk mail folder since the first form i coded myself. But, since i re-did the form, i get an error page that says "Mail() Failed." I've re-done it a billion times, and it still says this. any help? im using the coding i posted up two posts
starmena3
12-15-2004, 01:58 AM
can't you just put everything like it was before? just use the first code you used before making any changes
i did, and i keep getting this darn error. this is exactly how it was before i deleted it off my site today (at least i think so, anyway), and now it doesn't work. :(
xangelo
12-16-2004, 02:36 AM
So your trying to use your old form again? Could you post the original code here so we can take a look at it?
photon
12-17-2004, 03:16 AM
Forms are a waste of time.
Most people dislike filling out forms, just in case they are put on a spam list.
Just put your email address on your site.
reid315
12-17-2004, 04:23 AM
I think i see a problem. I dont think you are allowed to use the word "and" in an "if" statement, are you?
if(!empty($_GET['Name']) and !empty($_GET['Email']) and !empty($_GET['Subject']) and !empty($_GET['Message']))
vBulletin® v3.7.0, Copyright ©2000-2008, Jelsoft Enterprises Ltd.