Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 6 of 6
  1. #1
    Junior Member
    Join Date
    Nov 2004
    Posts
    2
    Member #
    8114
    I have been building a site for my wife, and on the whole have figured things out as I have gon along, until now that is. She wants a form.

    As I understand it I need to do two things:

    1. Build the form as normal (I am using Dreamweaver) puting in some code that when the button is clicked it sends the for to the ISP.

    2. Upload some extra code to the CGI-Bin at the ISP that tells the server what to do with the form data and where to send it.

    Am I right so far?

    The form I have created asks for the usual stuff, Name email address etc. However I also have two drop down menus asking the user to select a particular option.

    Is the addition of the drop down menus complicating matters and if so how do I deal with it.

    Sorry if this appears a little vague but I am not sure where I am suppose to be going with this.

    Any thoughts greatfully received.

    Nagger

  2.  

  3. #2
    Senior Member DanielOliver's Avatar
    Join Date
    Jun 2003
    Location
    Cornwall, England.
    Posts
    1,202
    Member #
    1879
    When you say a form do you mean a contact form of some sort? Where people can email her from the website?

  4. #3
    Junior Member
    Join Date
    Nov 2004
    Posts
    2
    Member #
    8114
    Quote Originally Posted by DanielOliver
    When you say a form do you mean a contact form of some sort? Where people can email her from the website?
    The form I want to use reuires them to input contact info, email address, name etc. I then want them to select from a drop down menu of dress sizes and again from another that offers a choice of material.

    Hope this is a little clearer

    Nagger

  5. #4
    Senior Member tibberous's Avatar
    Join Date
    Aug 2003
    Posts
    195
    Member #
    2535
    Depending on how you are doing it, you are basically on the right track. However, the SERVER is NEVER refered to as the ISP.

    Now, as I said, you are basically on the right track is you are using perl/cgi. If your server supports it, you may do better to use PHP. How to tell? Well, there are a ton of ways, but the best and most through is to make a page called test.php. Put nothing in the page but this:

    PHP Code:
    My PHP test
    <?php
     phpinfo
    ();
    ?>
    Then just visit the page in your web browser. If all you see if are the words My PHP test, view source. If you see everything as you typed it, your not setup for php. If you see like 3 pages of php stuff, you are setup for php. If you get any bold black error, you probably screwed up the line phpinfo();, I don't know how...

    If you can do php, then you can do this in a few, semi-basic steps (depends a lot on what you want the server to do with your data).

    As you probably already know, a form has an action and method. The action is the script you want to process the data, the method is how it's submitted, I reccomend POST. The dropdowns don't really add much dificulty (least not compared to having to learn a programming language). I'd show you how to use them but it seems like you have enough. See what you have and post back, your probably get a better responce if you include things like what language you are writing it in, what languages you can write it in, maybe even your server platform, links to your forms, ect...

    regards,

    Trent

  6. #5
    Member marik's Avatar
    Join Date
    Oct 2004
    Posts
    31
    Member #
    7814
    i dont mean to be mean but i dont think your wife wants a site, i think you want a site but too embarrased to admit your stuck. nagger, this site is for those that know webdesign and are here to help those that dont. But if you are doing it for your wife good luck


    ~marik~

  7. #6
    Senior Member mixu's Avatar
    Join Date
    Aug 2003
    Posts
    217
    Member #
    2815
    Quote Originally Posted by marik
    i dont mean to be mean but i dont think your wife wants a site, i think you want a site but too embarrased to admit your stuck. nagger, this site is for those that know webdesign and are here to help those that dont. But if you are doing it for your wife good luck


    ~marik~
    Well, that was very helpful - not. You seem to have a lot of anger in you, marik. The poor guy is just trying to learn something.

    CGI basics
    CGI forms basically work the way you described, nagger. First the form is displayed in an HTML document, then the user fills in the fields -> which are sent in a page request to the web server -> which relays them to the script in some form (in PHP the system processes them for you, in Perl one needs to read the environment variables manually).

    You will need to write (a new thing to learn), or find a script that reads the variables and does your desired processing (ex. sends an email).

    Each of the form fields you made should have a name associated with it - this name will be transferred to the script and you can refer to it to get the data (whether it is from a drop-down select box or from a text field does not matter).

    If you are new to web programming, I'd suggest you learn PHP, as it is closer to the way HTML operates. Go to www.php.net or even better, spend a couple dozen bucks on buying some printed matter - it's so much nicer than reading on-screen material, and usually more comprehensive.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 06:17 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com