View Full Version : Form Help
badboyz
03-27-2006, 08:41 PM
I was looking through the scripts but I didnt find what I was looking for.
I want a registration form with a bunch of Info that people have to fill out and when they hit submit, I want all that info to be sent to my Email address or saved into a file in FTP or something.
I want it to include First and Last Name, Company name, telephone, Website URL (beginning with http://), Email, Fax(Optional), Country, and a Business type (drop down box that has Importer, Whole-Saler, Customer Agent, and Retailer.).
If there is no script like that, can someone please make one and so it will work with .htm extension format.
Thank you in advance
I need it ASAP
can someone please make one and so it will work with .htm extension format.No.
This requires some form of server-side scripting.
badboyz
03-27-2006, 08:56 PM
Ummm, ok. So where can I get this then?
I need it ASAP
You need ASP. :p Well, actually, any server-side language will do, such as PHP or JSP, but you must have it installed on your server.
badboyz
03-27-2006, 09:02 PM
How do I know if I have it install or not? Where can I install it, and do I have to change all my files from .htm to a .asp extension?
do I have to change all my files from .htm to a .asp extension?No, just one.
How do I know if I have it install or not?Create a file with a .php, .asp, or .jsp extension. Navigate to it in your browser. If your browser asks you what to do with it, it isn't installed on your server.
badboyz
03-27-2006, 09:12 PM
ok, so if I decide to get PHP as my serverside language, how can I make it work for my form that I need?
I just checked it and I have it.
<?php if(isset($_POST['first'])) {
$message = $_POST['first'] . ' ' . $_POST['last'] . ' (' . $_POST['email'] . ') has just submitted your form.\n'
. 'Telephone: ' . $_POST['tel'] . '\n'
. 'Company: ' . $_POST['company'] . '\n';
mail("you@yourdomain.com", "Form submission", $message, "From: " . $_POST['email'] . "\r\n");
?>
<html>
<!-- Thank-you page goes here, in plain HTML -->
</html>
<?php
die();
}
?>
<html>
<head>
<title></title>
</head>
<body>
<form action="<?php echo($PHP_SELF); ?>" method="post">
Email: <input type="text" name="email"><br>
First name: <input type="text" name="first"><br>
Last name: <input type="text" name="last"><br>
Company name: <input type="text" name="company"><br>
<!-- You get the idea... -->
<input type="submit" value="Post">
</form>
</body>
</html>Untested. Note that PHP may need some extra setup to get mail working.
badboyz
03-27-2006, 10:37 PM
Thank you so much!
Freeman
03-28-2006, 03:22 PM
So If I was using asp instead of php would it be the same? And do you make a different page with the script that tells it where to go or does it do that by itself?
So If I was using asp instead of php would it be the same?No, you'd need to rewrite it completely. I don't know ASP, so I can't help you there.
And do you make a different page with the script that tells it where to go or does it do that by itself?It goes to itself. Fill in the thank-you page above: this is the page that will be displayed when the email has been sent.
Freeman
03-28-2006, 04:04 PM
I love you Twey, Will you marry me?
Hahaha, I'm not usually so flighty ;)
Freeman
03-28-2006, 04:09 PM
Thats to bad I think we could work.
.alias.
03-28-2006, 04:11 PM
lol freeman you are nuts, do you ask everybody to marry you may i just ask :p
Freeman
03-28-2006, 04:41 PM
Everyone... NO. Just the ones that can script like theres no tomorrow. Also when I click on submit it sends me on to the next page but it says error code 405 resource not allowed. I have no idea what that means but I don't think it worked. And the offer still stands.
Freeman
03-28-2006, 04:43 PM
<?php if(isset($_POST['first'])) {
$message = $_POST['first'] . ' ' . $_POST['last'] . ' (' . $_POST['email'] . ') has just submitted your form.\n'
. 'Telephone: ' . $_POST['tel'] . '\n'
. 'Company: ' . $_POST['company'] . '\n';
mail("jlbreak@gmail.com", "Form submission", $message, "From: " . $_POST['email'] . "\r\n");
?>
<html>
<!-- thank.htm -->
</html>
<?php
die();
}
?>
<html>
<head>
<title></title>
</head>
<body>
<form action="thank.htm" method="post">
Email: <input type="text" name="email"><br>
First name: <input type="text" name="first"><br>
Last name: <input type="text" name="last"><br>
Company name: <input type="text" name="company"><br>
<!-- You get the idea... -->
<input type="submit" value="Post">
</form>
</body>
</html>
heres what it says. why dosen't it work. Please guid me along the correct paths.
it says error code 405 resource not allowed.I did mention that your server may need some further setup to be able to send email. How this is done depends on the server and its platform.
Freeman
03-28-2006, 04:58 PM
That dosen't help me beacuse I have no idea how to do that. CRAP!!! O well. so how do you do it? maybe you should jump out of my monitor and help me. but that would be a little wierd so why not just tell me.
How this is done depends on the server and its platform.
so how do you do it?The usual response to being told that something depends on your server setup is to detail your server setup ;)
Freeman
03-28-2006, 08:49 PM
Ohhhhhh... so you think your sll smart huh? just caue I can't read. I guess you do have a point. Off then to find out how to do that.
badboyz
03-28-2006, 11:03 PM
The form you have gave me works and all but theres still something wrong. When it emails me saying someone submitted my form, it only says their First/Last name, Email, Telophone, and company.
Please tell me how to make it show more than that in the email. Just tell me how to make it work.
Thanks
Freeman
03-28-2006, 11:36 PM
You need to add more fields to your form. Or if you already did that then you need to make sure that they are in order and don't have the same names for the field. If you need to put in more fields just copy and paste another one and change the name attribute to what you want it to say.
badboyz
03-29-2006, 04:39 AM
Which one is a field? :confused: Please copy and paste it into here from Page 1.
Thanks
mwinter
03-29-2006, 01:49 PM
We seem to be missing a simpler solution, here. Yes, writing a server-side script and hosting it on an appropriately equipped server is a solution, but then again, writing a script that isn't succeptable to mail bombing and the like isn't altogether trivial. It also doesn't seem entirely clear that all of the posters looking for this solution actually have the means to execute their own form mailer.
So, why not use one that's remotely hosted (http://cgi.resourceindex.com/Remotely_Hosted/Form_Processing/), or perhaps explore the possibility that the host already provides one (even if they don't allow custom scripts)?
Mike
djr33
03-30-2006, 06:06 AM
A field is a checkbox, textbox, etc. It's like 'a thing you enter data into'
Ever heard of a 'text field'... same deal :)
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.