December 25th, 2000, 10:58 PM
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)
December 26th, 2000, 08:31 AM
>> 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.
December 27th, 2000, 12:23 PM
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;
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 "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?
Replies would be greatly appreciated.