1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

I need some help - Please, anyone!

Discussion in 'CIW Certifications' started by dee1810, May 14, 2007.

  1. dee1810

    dee1810 Byte Poster

    142
    2
    29
    Hi all

    I have never pretended to be an expert, and I have worked through the CIW perl books, but I'm dammed if I can find anything that tells me how to get a perl script together, in order to make my form work.

    I really am a Dummy about this subject. I know that I have to reference a cgi-bin, and runa perl script... but I'm lost completely.

    Please help me.. I'm really stuck...
     
    Certifications: Foundations, Site Designer & JavaScript
    WIP: Server Admin, and Perl
  2. JonnyMX

    JonnyMX Petabyte Poster

    5,239
    211
    236
    Sorry, Perl is something I've never got into.

    'Bump' as they say around here...
     
    Certifications: MCT, MCTS, i-Net+, CIW CI, Prince2, MSP, MCSD
  3. stuPeas

    stuPeas Megabyte Poster

    774
    12
    76
    Need a bit more info Dee. Do you have a script already but are having problems accessing on your server???
     
    Certifications: C&G Electronic, CIW Associate (v5).
    WIP: CIW (Website Design Manager)
  4. hbroomhall

    hbroomhall Petabyte Poster Gold Member

    6,623
    115
    224
    This will depend to a certain amount on the platform you are running this on. But basicaly the perl script needs to be 'executable' and be in the 'cgi' directory mandated by the HTTP server.

    But we need much more detail on this to be able to help properly.

    I *assume* you have written a HTML form, and the 'submit' needs to point at a script that can do something with the contents of that form. Perl isn't the only thing that can handle this, but I assume the the course is asking for a Perl answer.

    Harry.
     
    Certifications: ECDL A+ Network+ i-Net+
    WIP: Server+
  5. dee1810

    dee1810 Byte Poster

    142
    2
    29
    Harry

    Basically, yes, that is exactly what I need.

    I am running Windows XP, at home, and I am putting a website together for a friend. He uses his NTL webspace that he is entitled to as part of his contract.

    I have a form that I have created, but I can't work out how to write the script that I need to make the form return feedback to his server (NTL).
    I have completed Prosoft perl Fundamentals as part of my CIW Website Design Manager Course, but I can't recall the relevant section in there. I double-checked and can't find it there.
    To demonstrate the theory of this the course folders mention and then it points to the script, but say scriptfile which is the script that they are using to show how it would return the form back to you via Skillstrain server.

    See, I'm very lost.

    <form
    METHOD="post"
    ACTION="http://www.anyserver.com/cgi-bin/scriptfile">
    </form>

    My question is what do I write for the SCRIPTFILE, please.
    I have also seen this given as an example:
    <form
    METHOD="post"
    ACTION="http://www.ciwcertified.com/cgi-bin/process.pl">
    </form>

    Any ideas, please.

    Can anyone recommend an "easy to follow" tutorials for this :cry:
     
    Certifications: Foundations, Site Designer & JavaScript
    WIP: Server Admin, and Perl
  6. hbroomhall

    hbroomhall Petabyte Poster Gold Member

    6,623
    115
    224
    So this is a 'real-life' exercise, rather than something from a course.

    The first thing you need to discover is what facilities do NTL/Virgin offer on their web-servers. i.e. - do they offer Perl, and if so what modules are present? Can you logon to the server to try things, or is it only FTP access?

    If Perl is not offered what facilities *are* offered?

    What OS is being used for these servers?

    *if* (and that is a big 'if') there is Perl there, and a reasonable selection of modules, then a CGI Perl script would look something like this:
    Code:
    #!/usr/bin/perl -w
    
    use CGI;
    
    my $query = new CGI;
    
    my $name = $query->param('name');
    
    You will need to do some research so as to get the correct bits into the code.

    Harry.
     
    Certifications: ECDL A+ Network+ i-Net+
    WIP: Server+
  7. stuPeas

    stuPeas Megabyte Poster

    774
    12
    76
    This is the part you must include in the HTML form, substituting the FQDN of the location of your script on the server. In your second example above, the script that will process the data that your form submits is called "process.pl" and is stored on the server in the cgi-bin directory.

    Now... The actual script that you want to write can be called anything, as long as the server knows to access it through CGI. So it could be called myscript.pl if you want (scriptfile.pl and proccess.pl are simply the script names they have used on the course).

    It sounds like you are having trouble actualy writing the script. The contents of the script depend on what you want it to do with the data that it collects, and in turn, this depends on the questions asked in the HTML form.

    If you post the form and specify what data you need from it, and what it is you need to do with the data, then im sure some script master can help (I may give it a try, but like you, im no Perl expert. We both know about the same).

    Hope this helps
    Stuart.
     
    Certifications: C&G Electronic, CIW Associate (v5).
    WIP: CIW (Website Design Manager)
  8. JonnyMX

    JonnyMX Petabyte Poster

    5,239
    211
    236
    To be honest, unless there is a good reason not to, the easiest way to do this sort of thing is via a tool such as FrontPage.

    This will let you set up a feedback form easily and will give you a choice of what to do with the information - save it on the server, send it to a database or email it to an address.
     
    Certifications: MCT, MCTS, i-Net+, CIW CI, Prince2, MSP, MCSD
  9. dee1810

    dee1810 Byte Poster

    142
    2
    29
    Right Guys..
    Wow, what a lot of things to consider.
    Ok, I'll read it through again, and try to sort it out.

    StuPeas- Frontpage IS an optional.. I'll have a trawl through it...

    Cheers Guys
     
    Certifications: Foundations, Site Designer & JavaScript
    WIP: Server Admin, and Perl
  10. stuPeas

    stuPeas Megabyte Poster

    774
    12
    76
    not sure what you mean Dee.....I did not suggest frontpage.
     
    Certifications: C&G Electronic, CIW Associate (v5).
    WIP: CIW (Website Design Manager)
  11. dee1810

    dee1810 Byte Poster

    142
    2
    29
    :oops: Sorry...

    I can't think straight at the moment...I just know that I can't write this script...
     
    Certifications: Foundations, Site Designer & JavaScript
    WIP: Server Admin, and Perl
  12. stuPeas

    stuPeas Megabyte Poster

    774
    12
    76
    Dee..are you sure that you need a script? If i remember rightly, information from a html form can simply be emailed to the address specified in the submit part of the form.

    Not sure about security with this though, and it does mean that any processing would have to be done on receipt of the email.
     
    Certifications: C&G Electronic, CIW Associate (v5).
    WIP: CIW (Website Design Manager)
  13. hbroomhall

    hbroomhall Petabyte Poster Gold Member

    6,623
    115
    224
    This is true - as long as the server can honour a 'mailto' URI.

    Harry.

    EDIT: - <Cough> - After checking it is the *client* that has to do the mailto. As I don't use this feature I had forgotten this.

    Harry.
     
    Certifications: ECDL A+ Network+ i-Net+
    WIP: Server+
  14. dee1810

    dee1810 Byte Poster

    142
    2
    29
    right, guys..I see.

    Am I just thinking "too" technical, then. I'm trying to build a website for some ffriends, and if I give them a contact page with just mobiles and e-mail addresses, I was worried that it would look quite "poor".
    They only want a web presence, not to have to trawl through loads of responses...

    Re-think coming on, I reckon...:rolleyes:
     
    Certifications: Foundations, Site Designer & JavaScript
    WIP: Server Admin, and Perl
  15. stuPeas

    stuPeas Megabyte Poster

    774
    12
    76
    Just giving contact info is fine as far as i can see. Anyway, as Harry said, you probably would have foud that Perl (or the modules you need) wouldnt be available for the free web space they are entitled to. You could have done loads of work only to find that you need to pay a hosting company to have the options needed to be able to use the script.

    Id love to see the finished article.
     
    Certifications: C&G Electronic, CIW Associate (v5).
    WIP: CIW (Website Design Manager)

Share This Page

Loading...