Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 1 of 2 12 LastLast
Results 1 to 15 of 20
  1. #1
    New Coder
    Join Date
    Jul 2009
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    A simple input form (i hope)

    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!

    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)

    (SEND BUTTON)

    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!!!

  • #2
    New Coder
    Join Date
    Jul 2009
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    unfortunately not basic html im afraid. I've done some basic work with java in html but that was many moons ago!

  • #3
    New Coder
    Join Date
    Jul 2009
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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

  • #4
    New Coder
    Join Date
    Jul 2009
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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

  • #5
    Senior Coder tomws's Avatar
    Join Date
    Nov 2007
    Location
    Arkansas
    Posts
    2,644
    Thanks
    29
    Thanked 330 Times in 326 Posts
    Quote Originally Posted by Rayzer88 View Post
    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.
    Are you a Help Vampire?

  • #6
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,154
    Thanks
    203
    Thanked 2,548 Times in 2,526 Posts
    The trouble with using this method (mailto) to send form results is its unpredictability. The method it is highly dependent on the browser in use and the email client in use (some people have only Yahoo or Hotmail). With all of the browser troubles, you're likely to lose about half of your users' messages. Most of the email clients that can successfully send a mail will prompt the user by a security dialog prior to sending - this can scare many users from continuing. Also, what about people with Javascript disabled?

    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
    Last edited by Philip M; 07-29-2009 at 08:00 AM.

  • #7
    Senior Coder
    Join Date
    Jul 2009
    Location
    South Yorkshire, England
    Posts
    2,318
    Thanks
    6
    Thanked 304 Times in 303 Posts
    May be worthwhile having a peek at this if you can get PHP sorted on your hosting package.

    http://green-beast.com/gbcf-v3/

  • #8
    New Coder
    Join Date
    Jul 2009
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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!

  • #9
    Senior Coder
    Join Date
    Jul 2009
    Location
    South Yorkshire, England
    Posts
    2,318
    Thanks
    6
    Thanked 304 Times in 303 Posts
    PHP is a scripting language.

    http://php.net/

    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.
    Last edited by MattF; 07-29-2009 at 06:41 PM.

  • #10
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    26,588
    Thanks
    80
    Thanked 4,497 Times in 4,461 Posts
    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.

  • #11
    New Coder
    Join Date
    Jul 2009
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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)

    thanks again!

  • #12
    Regular Coder
    Join Date
    Mar 2008
    Posts
    301
    Thanks
    2
    Thanked 30 Times in 30 Posts
    Quote Originally Posted by tomws View Post
    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.)
    Last edited by fside; 08-01-2009 at 05:20 PM.

  • #13
    Senior Coder
    Join Date
    Jul 2009
    Location
    South Yorkshire, England
    Posts
    2,318
    Thanks
    6
    Thanked 304 Times in 303 Posts
    Quote Originally Posted by Rayzer88 View Post
    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:

    Code:
    <?php
    
    echo '<h2>This is the header</h2>';
    
    ?>
    would achieve exactly the same as:

    Code:
    <h2>This is the header</h2>
    Whatever you place between these tags:

    Code:
    <?php
    
    ?>
    is interpreted and parsed as php code, and anything outside of those tags is interpreted as standard html.

  • #14
    New Coder
    Join Date
    Jul 2009
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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!

  • #15
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    26,588
    Thanks
    80
    Thanked 4,497 Times in 4,461 Posts
    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:
    Code:
    ...
    <form action="processForm.php" method="post">
    ...
    </form>
    ...
    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.


  •  
    Page 1 of 2 12 LastLast

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •