View Full Version : A simple input form (i hope)
07-28-2009, 09:18 PM
Hey all, i'm new here and first off, i'd just like to offer my sincerest appologies if i've posted this in the wrong section! :o
I've made some basic HTML web sites in the past and now the company i work for has asked me to make one. Its a rubber roller manufacture company and i would like to make a page that will have input fields and a submit button that will send the inputted details to our sales manager's email address...something like this
Contact Name: (input box) Company Name: (input box)
Roller Diameter: (input box) Required Compound: (input box)
Email Address: (input box)
Also it would be a massive help if someone could tell me if it is possible for me to set it so that once the send button is clicked, it will send an email of the data but also redirect to another page (just saying thanks for input etc etc)
HUGE thanks in advance!!!
07-28-2009, 09:29 PM
unfortunately not :( basic html im afraid. I've done some basic work with java in html but that was many moons ago!
07-28-2009, 09:37 PM
i cant access the host as of yet. The domain etc has been purchased but at the moment i'm making the website and testing it on my home computer and to "live" test it im just uploading all of the files to geocities...so really at the moment i can only see if it works through geocities or by opening the index file offline
07-28-2009, 09:45 PM
Hmm i was hoping for friendly site...how wrong i was.
Why doubt my credibility? I've told you all that i know...my company has purchased a domain name etc and would like me to create the website to go on it...and on that website they would like a page where potential customers can ask for quotes
thanks but no thanks, i will go somewhere who may offer a more friendly welcome and perhaps someone who would actually like to help rather than "question" me
07-28-2009, 10:17 PM
Hmm i was hoping for friendly site...how wrong i was.
Actually, you just ran across someone in a prickish mood, it seems. Though I get that way myself sometimes.
Your decision to go with Geoshi... er... Geocities is unfortunate. They're closing in a few months. Find a web host that will fit your needs. I have several sites on Dreamhost. I see Hostmonster in another user's sig. These (and other) reputable hosts will have server-side languages available such as PHP to help handle your form input.
Once you do that, knock up Google for form building and handling tutorials. They're available in abundance. There are even PHP form mail scripts available if you want something like that.
As for the unhelpful comments, just add that user to your ignore list here. It's a nice forum feature.
07-29-2009, 07:47 AM
In fact few browsers these days accept mailto: as a form action. You need a really old browser for it to work as more modern browsers simply open the email program (if any) and ignore the form. If you are going to use a form then use a server-side formmail script as the action - there are several good free ones out there.
For a simple PHP form feedback script see:- http://www.thesitewizard.com/archive/feedbackphp.shtml
It is your responsibility to die() if necessary….. - PHP Manual
07-29-2009, 08:01 AM
May be worthwhile having a peek at this if you can get PHP sorted on your hosting package.
07-29-2009, 06:23 PM
tomws..yea using geocities is damn unfortunate lol! but it was what i know from years ago..the last time i made a website was about...oo 5 years ago, but it was only for gaming purposes so i used to host it on geocities and then link it through DOT.tk lol. Even though i have had BASIC past experience with HTML website building i suppose thats going to be the easy part! Using a paid for domain is completely new to me (but my employers know and understand this)...i am guessing that what they are paying for so far, so i suppose they need to pay for a server to store the site files in..any advice someone could give me on this would be a huge help but i understand that you are aren't "fairy godmothers" and this is a "come here and get everything" kind of place but any help would be GREATLY appreciated!
MattF...I checked out that link you sent and it looked great but PHP is completely and utterly new to me. I don't know how its created, edited or used in conjunction with the html pages i have already made so i think i may have to research PHP...do i need a special program? i downloaded that zip file and when i tried opening the php files and was told i needed a program.
I'm really sorry for being a pain and i know it probably doesn't mean a lot but it really is VERY much appreciated!
07-29-2009, 06:38 PM
PHP is a scripting language.
Usually, (these days), just about all webservers will have some method of generating dynamic content, (PHP, ASP, Perl, Ruby etc), as well as just serving static content, (html files etc). When those files in that package you downloaded are uploaded to a webserver which runs PHP, those files will be 'interpreted' and generate the contact form output as well as seeing to the validation and generating the e-mail once the form is submitted.
Edit: You can download the WAMP? server stuff which allows you to run a webserver on Windows with PHP, a SQL database and other gubbins. That would probably be your best method to break into playing around with things and finding out how they work.
07-30-2009, 12:12 AM
Agree with MattF re the WAMP download. But you could also consider ASP if you have Windows XP Pro or Windows Vista Premium on your PC, where it comes standard (though you may have to enable it...it's turned off by default in Vista).
As for hosts: GoDaddy offers a less-than-$5 a month plan for your choice of Windows or Linux. I'm reasonably happy with them. They aren't perfect, but at $5 a month it's hard to expect too much. I'm sure that I ate up all their profits on me for the first year in just my first month of hosting there, what with Helpdesk requests, etc.
08-01-2009, 05:10 PM
Hey again, thanks guys for all your help so far!
Im just downloading WAMP and im going to have a fiddle about, see if i can make any basic sense of it. Although i have no knowledge of PHP am i right in thinking that the whole page that i want the form to be on, have to be in PHP format (as in i cant use PHP in conjunction with HTML on the same page)
08-01-2009, 05:17 PM
Your decision to go with Geoshi... er... Geocities is unfortunate. They're closing in a few months. Find a web host that will fit your needs. I have several sites on Dreamhost. I see Hostmonster in another user's sig.
With Dreamhost, myself, and Brinkster. Both are good, with good support. But Dreamhost, maybe just of late, restricted something with server side, I forget what it was. And I found it at GoDaddy. So I'll probably open an account, there, and then hopefully remember just why. (I actually still have a site from the mid-90s, literally Mosaic/NN2 stuff, still showing on 'Geocities'. Can't access it. But it's still there.)
08-01-2009, 05:27 PM
Although i have no knowledge of PHP am i right in thinking that the whole page that i want the form to be on, have to be in PHP format (as in i cant use PHP in conjunction with HTML on the same page)
It can be either HTML or written in PHP. You can either switch in and out of php to generate static HTML, or generate dynamic HTML from within PHP. For example:
echo '<h2>This is the header</h2>';
would achieve exactly the same as:
<h2>This is the header</h2>
Whatever you place between these tags:
is interpreted and parsed as php code, and anything outside of those tags is interpreted as standard html.
08-01-2009, 10:01 PM
ahhh so if i've understood that right i can simply insert the php tag in the main body of my website (including all of the form data) and it should show up? i was worried i would have to convert the entire html page i have made into php!
08-01-2009, 11:04 PM
Actually, you probably want to leave your HTML page alone and have it *POST* to a *separate* PHP page.
YOu do that in the <form> tag:
<form action="processForm.php" method="post">
And then you have this separate PHP page ("processForm.php", but the name is entirely up to you) that reads all the $_POST["...form field name..."] values and creates and sends the mail.
At that point, you have a couple of options. *AFTER* the PHP code that sends the mail, you could just drop out of PHP mode and have an HTML page that thanks them for the mail. Or you can redirect from the PHP page to any HTML page on your site.
08-02-2009, 07:10 PM
Ahh right! well i think i have made a little progress. I've managed to get the actual form in my html page (See picture) now i just have to work out how to send that info to the php and then the email address :D
08-02-2009, 07:45 PM
Better than pasting in pictures is pasting in code. Pictures don't show us *anything* about what you are actually doing.
08-02-2009, 09:07 PM
Okies, my bad lol. here's the code for what i have done so far:
<form method="post" action="WEBSITE LINK/form.php">
<input type="hidden" name="PostParameter" value="email@example.com" />
<input type="text" id="Company" name="Company" size="30" />
<label for="Phone">Telephone Number:<br/></label>
<input type="text" id="Phone" name="Phone" size="30" />
<label for="email">Email Address:<br/></label>
<input type="text" id="email" name="email" size="30" />
<label for="Quanity">Quantity of Rollers:<br/></label>
<input type="text" id="Quantity" name="Quantity" size="30" />
<label for="Job">Recover/Regrind/Make Complete/Other:<br/></label>
<input type="text" id="Job" name="Job" size="30" />
<label for="FinDia">Finish Diameter:<br/></label>
<input type="text" id="FinDia" name="FinDia" size="30" />
<label for="StockDia">Stock Diameter:<br/></label>
<input type="text" id="StockDia" name="StockDia" size="30" />
<label for="Face">Face Length:<br/></label>
<input type="text" id="Face" name="Face" size="30" />
<label for="Overall">Overall Length:<br/></label>
<input type="text" id="Overall" name="Overall" size="30" />
<label for="Compound">Required Rubber Compound (EPDM, Nitrile etc):<br/></label>
<input type="text" id="Compound" name="Compound" size="30" />
<label for="message">Other notes/queries:<br/></label>
<textarea rows="5" cols="30" id="message" name="message">
A short message may be sent here.
obviously i could condense this a bit, i just wrote it like this so it made for easier editing :)
08-03-2009, 06:00 AM
Looks fine to me. I wouldn't bother with the <label>s or the IDs in the form fields, because those are text fields (labels are much more useful/usable with checkboxes and radio buttons), but that's just me.
08-03-2009, 05:20 PM
It may be just you but constructive criticism is always welcome! :) anything to condense it down a little. I'm gonna set to work on trying to get the whole php side of things tonight...should be fun!
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.