December 28th, 2000, 09:06 AM
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;
I have also 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?
If the best way is to $action itself then how would I populate the $hidden field when submitted to trigger the insert?
Replies would be greatly appreciated.