#1
  1. No Profile Picture
    dark_jurmanji
    Guest
    Devshed Newbie (0 - 499 posts)
    Hello,
    I am a little new to Perl and I am having a little trouble with my forst CGI Site. I'm trying to get on page to insert form information into a table. Everytime I fill out the form I get nothing passed to the other script. Then I tried to execute it it self and have had little luck with the "IF" statement.

    Can any one help??
    Replies would be helpfull. (and Appreciated)
    Thank You
    John W.
  2. #2
  3. No Profile Picture
    freebsd
    Guest
    Devshed Newbie (0 - 499 posts)
    >> I get nothing passed to the other script

    What other script? How many scripts? Are you using hidden fields?
    Nobody can help you if you don't provide more details and possibly take a look at your script, but posting your entire script here is not a wise thing to do.
  4. #3
  5. No Profile Picture
    dark_jurmanji
    Guest
    Devshed Newbie (0 - 499 posts)
    I appologize about that I was very tired that night that I wrote that.

    I have a form that 14 fields that need to be inserted into a Mysql table running on a "SUN" Server. My first script has only the form in it. I do have a hidden field but I don't know how to populate that field to have the $action execute itself.
    if ($hidden eq "insert_ok")
    {
    insert into table;
    }
    else
    {
    Print form with $hidden;
    }

    Or I have tried to have the $action point to "insertDB.cgi" the second script.

    I have tried this method, but have had no sucess. I have this script setup to
    "insert into DB..."
    if (rows <1)
    {
    "print record not inserted
    print $insert_statement;
    }
    else
    {
    print "record insrted";
    }
    When ever I try and execute the form I get no values passing to the second script. I get "insert into table (field1, field2, field3) values ("","","")". The insert statement works when I hard code all the values.

    Which way is the easiest way to insert this data into the table? Having the script $action itself of use a second script?
    If the best way is to $action itself then how would I populate the $hidden field when submitted? I have believe that you can do this with Javascript. I don't know anything about Javascript.

    Replies would be greatly appreciated.
    Thank You.

IMN logo majestic logo threadwatch logo seochat tools logo