35 users online (0 members and 35 guests)  

Thread: calling a table


  Results 1 to 13 of 13

Related

  1. Helsihki calling    Forum: Introduce Yourself
    Replies: 2
  2. Calling all Javascript'ers....    Forum: Internet Services
    Replies: 0
  3. Hollland calling    Forum: Introduce Yourself
    Replies: 1
  4. Replies: 5
  1. #1
    DuMaurier69's Avatar
    New User

    Status
    Offline
    Join Date
    Sep 2002
    Posts
    18

    Cool Hey I need help!!!

    Yo ppl i need help to call a table and information from one file using a form to another on my web site it's for work so if someone could help it would be vary helpful.

  2. #2
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    Hi there. Welcome to the forums.

    Small question, but the answer is pretty much beyond the scope of a forum.

    To read data, then transfer it, you are pretty much looking @ server-side technologies. Whcih one, tho? Its for work, so what server are they using?

    win2k?winNT? Unix? Linux?

    The win family would mean you need to use ASP to sort out your data. The UNIX would mean probably PHP. CGI/Perl usually works on both. Which have you got installed?

    As you can see, before we even start we are looking for more info.

    I suggest the following learning resources -

    php - www.php.net

    asp - www.asp.net

    You need full-blown tutorials to teach you what you need to know to achieve what you need. You will find them @ the above sites. Also try www.webmonkey.com and www.w3schools.org .

    if you are lucky, you may find a pre-written script capable of what you need. Try www.hotscripts.com , they are very good.
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  3. #3
    DuMaurier69's Avatar
    New User

    Status
    Offline
    Join Date
    Sep 2002
    Posts
    18

    I still dont get it

    Yea ok i'm running a unix like program and using a text editor called pico to run my HTML program. What i want to do is call a table up using a form that tells me the name and disk usage on the main server by the info put in the form, the form looks like this in html.
    <table border=2><tr><td>
    <center>
    <font color=red>
    <b>NetAccess client Disk Space</b><p>
    </font>
    <form action="http://paulgallai.nas.net/cgi-bin/users.pl"
    method="post\">
    <b>Enter userid:</b>
    <input type=text name=userid size=16>
    <input type=submit name=action value=Submit>
    </form>
    </center>
    </td></tr>
    </table>

  4. #4
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    Ah.

    The form itself does nothing more than 'squirt' the data entered in it at a script specified in the action of the form.

    I see you have a perl script there called users.pl . How did this get there? Is it there? Who wrote it? What is it supposed to do?

    users.pl is basically the clever part. If its not working, try reading the documentation that came with it. If its giving errors, post them here.
    looking at your code, it looks like most of the work is done. However, any 'results' pages will be produced by the script itself.

    I tried the form and got a '500 Internal Server Error'. Thats not good. Make sure the top line of the script (open it in any text editor) is set to the correct 'path to perl'. SHould look something like this -

    PHP Code:
    #!/usr/bin/perl 
    Make sure the path is correct.
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  5. #5
    DuMaurier69's Avatar
    New User

    Status
    Offline
    Join Date
    Sep 2002
    Posts
    18
    #!/usr/bin/perl
    push(@INC,'/home/www/nas-cgi');
    require 'cgi-lib.pl';
    print &PrintHeader;
    select STDOUT;
    $|=1;
    &ReadParse;

    $user=$in{"userid"};

    print ("<HTML><HEAD><TITLE>USERS ON SIGMA</TITLE></HEAD>");
    print ("<BODY bgcolor=blue>");
    print ("<h1><center>Net Access</center></h1>");
    print ("<hr width=50%>");
    print ("<p> What's up ppl welcome to my site please enjoy it! </p>");

    print ("<table border=2><tr><td>");
    print ("<center>");
    print ("<font color=red>");
    print ("<b>NetAccess client Disk Space</b><p>");
    print ("</font>");
    print (" <form action=http://paulgallai.nas.net/cgi-bin/users.pl
    method=post\">");
    print ("<b>Enter userid:</b>");
    print ("<input type=text name=userid size=16>");
    print ("<input type=submit name=action value=Go>");
    print ("</form>");
    print ("</center>");
    print ("</td></tr>");
    print ("</table>");
    opendir(ETC,"/home");
    while ($name = readdir(ETC)){
    if ($user eq $name){
    print("<font color=red><b><BR><BR>$user</b><BR><BR>");
    }
    }
    print ("</BODY></HTML>");
    closedir(ETC);
    Is my program but i want now to call up disk usage space in the program using the same dir as the users are in. for example i enter paulgallai in the form and it appears
    paulgallai 576576k or whatever.
    when i click submit

  6. #6
    HTML's Avatar
    Administrator

    Status
    Offline
    Join Date
    Aug 2000
    Posts
    3,445

    Follow HTML On Twitter Add HTML on Facebook Add HTML on Google+ Add HTML on Linkedin Visit HTML's Youtube Channel
    I am going to move this thread to the scripts forum.

    Dave
    AHFBWEB Less customers per server, more power for you!

    Business Class Shared Hosting

  7. #7
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    require 'cgi-lib.pl';
    Is the file above where it should be in the webserver?

    Is apache (or whatever) setup to handle the mime-type *.cgi with the proper perl-type programs?

    Do any other cgi programs work on the webserver?

    Where did the script come from? Did you write it, or get any documentation with it?

    Don't you hate it when you ask a question and someone asks 10 questions back?
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  8. #8
    DuMaurier69's Avatar
    New User

    Status
    Offline
    Join Date
    Sep 2002
    Posts
    18
    Dean I dont know much try to numb it down a little all i know is that i wrote the program it's supposed to call the name put into the form and how much space the user is using on the disk if u can help me wright the program to do this it would be a big help!

  9. #9
    nitewing's Avatar
    Senior Member

    Status
    Offline
    Join Date
    Sep 2002
    Location
    Panama City, Florida
    Posts
    139
    Is the script uploaded in text mode? Is it chmod 755?
    Might you need to change .pl to .cgi? some servers are only setup to handle .cgi and not .pl

    nitewing
    Last edited by nitewing; 09-27-2002 at 10:10 AM.
    Ann/nitewing

  10. #10
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    I am no expert on Perl, unfortunately. Dinosaur language

    nitewings advice is very good, try that first.

    If you wrote that script, then you are better qualified to troubleshoot it than me
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  11. #11
    DuMaurier69's Avatar
    New User

    Status
    Offline
    Join Date
    Sep 2002
    Posts
    18
    yes it accepts .pl not cgi

  12. #12
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    Wheres your webserver? I want to check that you have the correct 'path-to-perl'.

    Another thing, did you upload it in Binary or ASCII? It has to be ASCII.
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  13. #13
    DuMaurier69's Avatar
    New User

    Status
    Offline
    Join Date
    Sep 2002
    Posts
    18
    the web server is nas.net
    And it's done in ASCII



Tags for this Thread