Gossamer Forum
Home : Products : DBMan : Customization :

Unable to Modify Record

(Page 1 of 2)
> >
Quote Reply
Unable to Modify Record
Hi if i can not modify the record, and it returns with "(can't find requested record)" what does that mean?
and where did i do wrong???

if someone could direct me furthur.thanks1

Quote Reply
Re: Unable to Modify Record In reply to
This is definitely a problem with the $db_key value.

Are you sure there are fields in sub html_record_form for every field listed in your .cfg file? Are you sure that the names of every field is exactly the same as the names in the .cfg file? (This is not a factor if you are using the autogenerate feature.)

Have you changed the number of fields since you started your database?

Are you certain that you have a unique value in the $db_key field for each record?

If none of these questions seem to help, I'll need to see your .cfg file. Please copy it to a web-accessible directory (one where you would place .html files) and rename it to default_cfg.txt. Then come back here and tell me where I can find it. I'll look at the file and see what I can figure out.


JPD
Quote Reply
Re: Unable to Modify Record In reply to
thanks JPDeni.. :)

i looked thru the code and found out there were couple of fields i did not include...

ok here is what i've done and so far it seems ok.....

<input type="hidden" name="Userid" value="$rec{'Userid'}" SIZE="20" MAXLENGTH="255">$rec{'Userid'}
<input type="hidden" name="ID" value="|; print $rec{'ID'}; print qq|" SIZE="20" MAXLENGTH="255">
<input type="hidden" name="Graphic" value="|; print $rec{'Graphic'}; print qq|" SIZE="20" MAXLENGTH="255">

With the graphic field, it was the option for users to search if the graphic is exsit or not..and i am not sure if that is neccesary to be there at all...cos i won't print out any value...

and the Userid... i was thinking taking this off cos i did not use it in anyplace at all...seems it's position is "1" right after the "ID" field, and the rest runs in sequencial order, can i simply remove the filed in the cfg page? like i will then have 0,2,3,4,5,and so on so on...


lastly....i've just found out...ever since i have put the upload mod on, my select box is very weird....it will only print one value no matter how many other have u picked....
and could it be related to the $db_key value ???

It you like, i will be more then happy to make a copy of my cfg file...trouble is, my site is in chinese and i have added a lot of chunks and you might find it very messy....:)


thanks for your help,


Paul


Quote Reply
Re: Unable to Modify Record In reply to
Make your hidden fields to look like this:

<INPUT TYPE="TEXT" NAME="Userid" SIZE="20" VALUE="$rec{'UserID'}" MAXLENGTH="10">
<INPUT TYPE="TEXT" NAME="ID" SIZE="20" VALUE="$rec{'ID'}" MAXLENGTH="10">
<INPUT TYPE="TEXT" NAME="Graphic" SIZE="20" VALUE="$rec{'Graphic'}" MAXLENGTH="10">

You seem to have some extra print qq| commands in the middle of your coding Smile

quote:
With the graphic field, it was the option for users to search if the graphic is exsit or not..and i am not sure if that is
neccesary to be there at all...cos i won't print out any value...

I believe this is required for the mod to function. Reread the instructions if to see how this field is used.

quote:
and the Userid... i was thinking taking this off cos i did not use it in anyplace at all...seems it's position is "1" right
after the "ID" field, and the rest runs in sequencial order, can i simply remove the filed in the cfg page? like i will
then have 0,2,3,4,5,and so on so on...

If you remove a field it will mess up your database. If you choose to not use a field once it's created, just leave it there as you can always rename it to something else later Smile.
If you are just starting your database and do decide to remove it, you would need to renumber your fields. You will have problems if you don't have the numbers listed consecutively.

quote:
lastly....i've just found out...ever since i have put the upload mod on, my select box is very weird....it will only print
one value no matter how many other have u picked....
and could it be related to the $db_key value ???

I would suggest first fixing the $db_key value and get that working. You may also have to fix your database if you originally forgot to add some of the fields in your add form.

Hope this helps :)

Quote Reply
Re: Unable to Modify Record In reply to
Thanks :)

i am now able to edit the records now...but the select box thing is still weird.... i went back to my backups and i found right before i added the upload mod everything was perfect.... could it be the conflict btw those two mods?

thanks :)

Quote Reply
Re: Unable to Modify Record In reply to
token:

I don't think the two mods would conflict, but please be sure to check your database. If you added other fields such as "Graphic" after you installed the upload mod and didn't include that field in your database it could mess up displaying some of the fields.

Did you check your database to be sure there is a entry for each field or a blank between the | for nothing within a field?

Quote Reply
Re: Unable to Modify Record In reply to
thanks Loisc,

erhh i did included the "gapic"fled which is hidden cos according to the upload mod tutorial it is only for search options...

yes there are 3 blanks on my default.db file...
one is the userid field, i am not using it nad i ahve make it hidden as i mentioned above.. and the other 2 are the graphic and the path of the local when they submit images...and my upload is messy up now and i am pulling my hair trying to solve it...... :(


and...after i modfy my file it wont overwrite it but instead it generates a new ID name in a sequencial manner.....like.. 1d4, 1d5,1d6 and so on....


please help....

and thanks again...





Quote Reply
Re: Unable to Modify Record In reply to
Since you've moved this question into a new thread, I'll stop responding in here.

Sounds like you are getting close to having it working Smile

Quote Reply
Re: Unable to Modify Record In reply to
erhhhh no it actaulyl runs the oppsite....
now i have screwed up my upload mod as well, and then check field box is not working...and JPDeni suggested me to change the $db_key_track = 0; but then i get the god old "duplicate error" message again.....so back to the original spot.....


i need some fresh air...hehehe

thanks!!

Quote Reply
Re: Unable to Modify Record In reply to
I think I know where your problem is.

You should not be getting a "duplicate key error" when you modify a record. You have done something wrong in sub validate_record.

Please make your db.cgi file available as a .txt file on the web and I'll take a look at it.


JPD
Quote Reply
Re: Unable to Modify Record In reply to
Please go to:

http://www.happy78.com/html.txt
http://www.happy78.com/db.txt
http://www.happy78.com/default.cfg

you might see some messy code, if so that must be the chinese encoding....and i think they are fine becasue i always check them in english first before i change them into chinese....

once again really appreciate for your help.... :)

Quote Reply
Re: Unable to Modify Record In reply to
The preview mod is only for adding records to the database. It is not for when you modify a record.

If you want, I'll write something so you can preview a record before modifications are made, but that will be number 13 on my list.


JPD
Quote Reply
Re: Unable to Modify Record In reply to
sure thing :)

but how can i thank you???


i ahve chnaged the preview thing and it still kicks back with na duplicate error...and if i chnage the auto_track=1

it will add the record but then again it did not overwrite the record but instead it add another one in a sequencial manner...

ouch!

Quote Reply
Re: Unable to Modify Record In reply to
Did you change the following line that was in your sub html_modify_record_form:


<INPUT TYPE="SUBMIT" NAME="preview_record" VALUE="Preview Record">


It should be


<INPUT TYPE="SUBMIT" NAME="modify_record" VALUE="Modify Record">



JPD
Quote Reply
Re: Unable to Modify Record In reply to
haha
idiot me, i put
<INPUT TYPE="SUBMIT" NAME="add_record" VALUE="add Record">
instead of
<INPUT TYPE="SUBMIT" NAME="modify_record" VALUE="Modify Record">

and it works.......

BUT

when add a new record,

the preview image still dont show up.. well it didnt get added at all

it works fine when i got in and modify info + upload the image again...

so looks like the modify record issue have been solved, (THANKS TO YOU!! U R DA BOMB!!), What's left is the selection box thingy (wont record more then one choice) and upload not working when first added...

really really appreciate your help....


!! :D very sleepy but very hyper!!



Quote Reply
Re: Unable to Modify Record In reply to
The code that allows the file to be uploaded is the line

if (($status eq "ok") && ($in{'Filename'})) { $status = &validate_upload; } #Validate Picture

You need to move that to sub preview, if you want the file to be uploaded during the preview.

Regarding the select field and multiple selections -- you'll need to add a subroutine to build a multiple select field.

Add the following subroutine to db.cgi:

Code:

sub build_multiple_select_field {
# --------------------------------------------------------
# Builds a multiple SELECT field based on information found
# in the database definition.

my ($column, $value, $size) = @_;
my (@fields, @values, $ouptut);

$size or ($size = 3);

@values = split (/\Q$db_delim\E/,$value);

@fields = split (/\,/, $db_select_fields{$column});
if (! exists ($db_select_fields{$column})) {
$output = "error building select field: no fields specified/unkown field ($column)!";
}
else {
$output = qq|<SELECT NAME="$column" MULTIPLE SIZE=$size><OPTION>---|;
foreach $field (sort @fields) {
if (grep $_ eq $field, @values) {
$output .= "<OPTION SELECTED>$field\n";
}
else {
$output .= "<OPTION>$field";
}
}
$output .= "</SELECT>";
}

return $output;
}
To use it, instead of

print &build_select_field ("FieldName", "$rec{'FieldName'}");

use

print &build_multiple_select_field ("FieldName", "$rec{'FieldName'}",3);

You can change the 3 to any number you wish. That is the number of items that will show in the select field. To select more than one item, hold down the CTRL key on your keyboard as you select them with the mouse. You'll probably want to give that instruction to your users.



JPD
Quote Reply
Re: Unable to Modify Record In reply to
thanks.

the upload is working now (Hurray~~!!!)
and the multi selection is cooler then the "build fancy select fiedl" (Huraay x2~~!!)
BUT
check box is not working.( oh doh, i should have check that at the first place, now i really dunno when did it occured)
it only print one even if i select 12 of them ....

i am very sorry to bother u again.....JDPeni
:(



Quote Reply
Re: Unable to Modify Record In reply to
I tried viewing your site, but since I don't enable javascript in my browser your index page was blank. So I looked at your .cfg file to see if I could possibly spot anything.

I did notice your checkbox definitions as:

萣checkbox_fields = (
Popular => 'Yes',
Language =>'中文,英文,日文,韓文,法文,德文,西班牙文,義大利文,俄文,台語,客家話,廣東話,其他方言,其他國語言',
Graphic => 'Yes',
Lookingfor => '男女朋友,筆友,曾經擁有,酒肉朋友' ,
Pet => 'cat,dog,turtle,rabbit',
Transport => '腳踏車,摩托車,汽車,大眾交通工具,搭便車',
Lookingsex => 'man,woman,both',
);

You have a checkbox for popular, but I didn't see a field for this.

Also after the last line, it is not necessary to include a comma as a separator.

Change:

Lookingsex => 'man,woman,both',

to:

Lookingsex => 'man,woman,both'

I'm not sure if the extra space before the comma would make a difference on this line:

Lookingfor => '男女朋友,筆友,曾經擁有,酒肉朋友' ,

but it wouldn't hurt to remove it anyway Smile

Hope this helps, I couldn't see anything else.

Quote Reply
Re: Unable to Modify Record In reply to
here is the actual site for the match thing:

www.happy78.com/cgi-bin/db/db.cgi

i have removed the "popular" and also the "validated" for the radio box, also removed te space and the comma....
still not working...

would you like me to make those files available for downlaod? maybe i can put it under the root directory..infact i just done that

www.happy78.com/db.cgi
www.happy78.com/auth.pl
www.happy78.com/html.pl
www.happy78.com/default.cfg

thanks


Quote Reply
Re: Unable to Modify Record In reply to
Okay checked your .cfg file again and noticed the following:

Idol => [37, 'alpha', 40, 255, 0, '', ''],

The numbering of your fields is out of sequence Smile try changing this to:

Idol => [31, 'alpha', 40, 255, 0, '', ''],

----------------
In your 萣select_fields remove the last comma before );

Education => '國中以下,高中,高職,大專,大學,碩士,博士,空大空專',
);

------------------
In your 萣radio_fields remove the last comma before );

Sex => '男,女',
);

After making this correction you may need to start with a new .db and test some entries.

Hope this helps :)

Quote Reply
Re: Unable to Modify Record In reply to
Personally, I think it is a big mistake to have multiple options in a checkbox field. It is better to have a database field defined for each option.

JPD
Quote Reply
Re: Unable to Modify Record In reply to
first of all, thanks for all of you helping out.

I still can't get the checkbox working, it must be some mistake i did when i trying to cramp all the mod into...too greedy...

i am restarting with a clean script and adds one by one..surely but steady.... and if i still fail i will come back again.

thanks!!


Paul

Quote Reply
Re: Unable to Modify Record In reply to
Wow

ok

start a clean script which the secure mod installed... tested it and perfect

then

add the upload mod, the upload mod works fine (thanks)
but the check box went weird again

so
i must have done something wrong during the upload mod installation... and i check it so many times...still dunno what is going on...

ok here is my db.cgi in parts (the parts which u have to modify during the upload mod)

the default is still the same, i did take out some commas and spce...thanks to LoisC and JPDeni

thanks for the help !

#################################

$db_script_path = ".";
use CGI;
$query = new CGI;



#############################################

sub parse_form {
# --------------------------------------------------------
# Parses the form input and returns a hash with all the name
# value pairs. Removes SSI and any field with "---" as a value
# (as this denotes an empty SELECT field.

my (@pairs, %in);
my ($buffer, $pair, $name, $value);

PAIR: foreach $name ($query->param()) {
$value = $query->param("$name");
$name =~ tr/+/ /;
$name =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$value =~ s///g;
if ($value eq "---") { next PAIR; }
unless ($value) { next PAIR; }
(exists $in{$name}) ?
($in{$name} .= "~~$value") :
($in{$name} = $value);
}
return %in;
}


###################################3


sub add_record {
# --------------------------------------------------------
# Adds a record to the database. First, validate_record is called
# to make sure the record is ok to add. If it is, then the record is
# encoded and added to the database and the user is sent to
# html_add_success, otherwise the user is sent to html_add_failure with
# an error message explaining why. The counter file is also updated to the
# next number.

my ($output, $status, $counter);
# Set the userid to the logged in user.
($auth_user_field >= 0) and ($in{$db_cols[$auth_user_field]} = $db_userid);

# First we validate the record to make sure the addition is ok.
$status = &validate_record;

# We keep checking for the next available key, or until we've tried 50 times
# after which we give up.
while ($status eq "duplicate key error" and $db_key_track) {
return "duplicate key error" if ($counter++ > 50);
$in{$db_key}++;
$status = &validate_record;
}

if (($status eq "ok") && ($in{'Filename'})) { $status = &validate_upload; } #Validate Picture

opendir (GRAPHIC, "$SAVE_DIRECTORY") or &cgierr("unable to open directory in delete records: $SAVE_DIRECTORY. Reason: $!");
@files = readdir(GRAPHIC);
closedir (GRAPHIC);
$file_test = $in{$db_key} . ".";
foreach $file (@files) {
if ($file =~ /^$file_test/) {
$in{'Graphic'} = 'Yes';
$graphic_found=1;
}
}
unless ($graphic_found) { $in{'Graphic'} = ''; }


if ($status eq "ok") {
open (DB, ">>$db_file_name") or &cgierr("error in add_record. unable to open database: $db_file_name.\nReason: $!");
if ($db_use_flock) {
flock(DB, 2) or &cgierr("unable to get exclusive lock on $db_file_name.\nReason: $!");
}
print DB &join_encode(%in);
close DB; # automatically removes file lock
if ($db_key_track) {
open (ID, ">$db_id_file_name") or &cgierr("error in get_defaults. unable to open id file: $db_id_file_name.\nReason: $!");
if ($db_use_flock) {
flock(ID, 2) or &cgierr("unable to get exclusive lock on $db_id_file_name.\nReason: $!");
}
print ID $in{$db_key}; # update counter.
close ID; # automatically removes file lock
}
&auth_logging("added record: $in{$db_key}") if ($auth_logging);
&html_add_success;
}
else {
&html_add_failure($status);
}
}



####################################

sub modify_record {
# --------------------------------------------------------
# This routine does the actual modification of a record. It expects
# to find in %in a record that is already in the database, and will
# rewrite the database with the new entry. First it checks to make
# sure that the modified record is ok with validate record.
# It then goes through the database looking for the right record to
# modify, if found, it prints out the modified record, and returns
# the user to a success page. Otherwise the user is returned to an error
# page with a reason why.

my ($status, $line, @lines, @data, $output, $found, $restricted);

$db_not_null{'Filename'} = 0;
$status = &validate_record; # Check to make sure the modifications are ok!


if (($status eq "ok") && ($in{'Filename'})) { $status = &validate_upload; } #Validate Picture
opendir (GRAPHIC, "$SAVE_DIRECTORY") or &cgierr("unable to open directory in delete records: $SAVE_DIRECTORY. Reason: $!");
@files = readdir(GRAPHIC);
closedir (GRAPHIC);
$file_test = $in{$db_key} . ".";
foreach $file (@files) {
if ($file =~ /^$file_test/) {
$in{'Graphic'} = 'Yes';
$graphic_found=1;
}
}
unless ($graphic_found) { $in{'Graphic'} = ''; }

if ($status eq "ok") {
open (DB, "<$db_file_name") or &cgierr("error in modify_records. unable to open db file: $db_file_name.\nReason: $!");
if ($db_use_flock) { flock(DB, 1); }
@lines = <DB>; # Slurp the database into @lines..
close DB;

($restricted = 1) if ($auth_modify_own and !$per_admin);

$found = 0; # Make sure the record is in here!
LINE: foreach $line (@lines) {
if ($line =~ /^$/) { next LINE; } # Skip and Remove blank lines
if ($line =~ /^#/) { $output .= $line; next LINE; } # Comment Line
chomp ($line);
@data = &split_decode($line);
($output .= "$line\n" and next LINE) if ($restricted and ($db_userid ne $data[$auth_user_field]));

if ($data[$db_key_pos] eq $in{$db_key}) {
# If we have userid's and this is not an admin, then we force the record to keep it's own
# userid.
if ($auth_user_field >= 0 and (!$per_admin or !$in{$db_cols[$auth_user_field]})) {
$in{$db_cols[$auth_user_field]} = $data[$auth_user_field];
}
$output .= &join_encode(%in);
$found = 1;
}
else {
$output .= $line . "\n"; # else print regular line.
}
}
if ($found) {
open (DB, ">$db_file_name") or &cgierr("error in modify_records. unable to open db file: $db_file_name.\nReason: $!");
if ($db_use_flock) {
flock(DB, 2) or &cgierr("unable to get exclusive lock on $db_file_name.\nReason: $!");
}
print DB $output;
close DB; # automatically removes file lock

&auth_logging("modified record: $in{$db_key}") if ($auth_logging);
&html_modify_success;
}
else {
&html_modify_failure("$in{$db_key} (can't find requested record)");
}
}
else {
&html_modify_failure($status); # Validation Error
}
}

#################################################


sub validate_upload {
# --------------------------------------------------------
my ($filekey,$filename,$newfilename,$extlength,$filehandle,$totalbytes,$buffer,$bytes,@extensions,@ext);

$| = 1;

$filekey = $query->param("Filename");
$newfilename = $in{$db_key};

if (!(-e $SAVE_DIRECTORY)) {
return "The directory doesn't exist. Make sure that this directory is a complete path name,<BR>
not a URL or something similar. It should look similar to<BR>
/home/username/public_html/uploads";
}
if (!(-W $SAVE_DIRECTORY)) {
return "The directory isn't writable. Make sure that this directory is writable by all users.<BR>
At your UNIX command prompt, type chmod 777 $SAVE_DIRECTORY";
}
if (!(-d $SAVE_DIRECTORY)) {
return "The directory you specified isn't really a directory.<BR>
Make sure that this is indeed a directory and not a file.";
}

if ($filekey =~ /([^\/\\]+)$/) {
$filename = $1;
$extlength = length($filename) - index($filename,".");
$filename = $newfilename . lc(substr($filename,-$extlength,$extlength));
unless ($filename =~ /$ALLOWED_EXT/) {
$ALLOWED_EXT =~ s/\\//g;
$ALLOWED_EXT =~ s/\$//g;
@ext = split (/\Q|\E/o,$ALLOWED_EXT);
$ALLOWED_EXT = join(" or ",@ext);
return "Only files with the following extension(s) are allowed: $ALLOWED_EXT";
}
}
else {
return "You attempted to upload <B>$filekey</B> that isn't properly formatted. Please rename the file
on your computer, and attempt to upload it again. Files may not have forward or backward slashes in
their names. Also, they may not be prefixed with one (or more) periods.";
}

opendir (GRAPHIC, "$SAVE_DIRECTORY") or &cgierr("unable to open directory in delete records: $SAVE_DIRECTORY. Reason: $!");
@files = readdir(GRAPHIC);
closedir (GRAPHIC);
$file_test = $in{$db_key} . ".";
foreach $file (@files) {
if ($file =~ /^$file_test/) {
unlink ("$SAVE_DIRECTORY/$file");
}
}
if (!open(OUTFILE, ">$SAVE_DIRECTORY\/$filename")) {
return "There was an error opening '$SAVE_DIRECTORY\/$filename' for Writing.\n";
}

binmode(OUTFILE); # This is needed to work on Windows/NT platforms.

while ($bytes = read($filekey,$buffer,1024)) {
$totalbytes += $bytes;
print OUTFILE $buffer;
}

close($filekey);
close(OUTFILE);

chmod (0666, "$SAVE_DIRECTORY\/$filename");

if ($totalbytes > $MAXIMUM_UPLOAD && $MAXIMUM_UPLOAD > 0) {
unlink "$SAVE_DIRECTORY\/$filename";
return "Filename<BR>
You have reached your upload limit.<BR>
Your file contains <B>$BytesRead $totalbytes</B> bytes.<BR>
This exceeds the maximum limit of <B>$MAXIMUM_UPLOAD</B> bytes.<BR>
Your file was not saved.<BR>
Please try again.";
}

return "ok";
}



################################################3


sub delete_records {
# --------------------------------------------------------
# Deletes a single or multiple records. First the routine goes thrrough
# the form input and makes sure there are some records to delete. It then goes
# through the database deleting each entry and marking it deleted. If there
# are any keys not deleted, an error message will be returned saying which keys
# were not found and not deleted, otherwise the user will go to the success page.

my ($key, 煔ete_list, $rec_to_delete, @lines, $line, @data, $errstr, $succstr, $output, $restricted);
$rec_to_delete = 0;
foreach $key (keys %in) { # Build a hash of keys to delete.
if ($in{$key} eq "delete") {
$delete_list{$key} = 1;
$rec_to_delete = 1;
}
}
if (!$rec_to_delete) {
&html_delete_failure("no records specified.");
return;
}

open (DB, "<$db_file_name") or &cgierr("error in delete_records. unable to open db file: $db_file_name.\nReason: $!");
if ($db_use_flock) { flock(DB, 1); }
@lines = <DB>;
close DB;

($restricted = 1) if ($auth_modify_own and !$per_admin);

LINE: foreach $line (@lines) {
if ($line =~ /^$/) { next LINE; }
if ($line =~ /^#/) { $output .= $line; next LINE; }
chomp ($line);
@data = &split_decode($line);
($output .= "$line\n" and next LINE) if ($restricted and ($db_userid ne $data[$auth_user_field]));

if ($delete_list{$data[$db_key_pos]}) { # if this id is one we want to delete
$delete_list{$data[$db_key_pos]} = 0; # then mark it deleted and don't print it to the new database.
if ($db_upload) {
opendir (GRAPHIC, "$SAVE_DIRECTORY") or &cgierr("unable to open directory in delete records: $SAVE_DIRECTORY. Reason: $!");
@files = readdir(GRAPHIC);
closedir (GRAPHIC);
$file_test = $data[$db_key_pos] . ".";
foreach $file (@files) {
if ($file =~ /^$file_test/) {
unlink ("$SAVE_DIRECTORY/$file");
}
}
}
}
else { $output .= $line . "\n"; }
}

foreach $key (keys 煔ete_list) {
$delete_list{$key} ? # Check to see if any items weren't deleted
($errstr .= "$key,") : # that should have been.
($succstr .= "$key,"); # For logging, we'll remember the one's we deleted.
}
chop($succstr); # Remove trailing delimeter
chop($errstr); # Remove trailing delimeter

open (DB, ">$db_file_name") or &cgierr("error in delete_records. unable to open db file: $db_file_name.\nReason: $!");
if ($db_use_flock) {
flock(DB, 2) or &cgierr("unable to get exclusive lock on $db_file_name.\nReason: $!");
}
print DB $output;
close DB; # automatically removes file lock

&auth_logging("deleted records: $succstr") if ($auth_logging);
$errstr ? # Do we have an error?
&html_delete_failure($errstr) : # If so, then let's report go to the failure page,
&html_delete_success($succstr); # else, everything went fine.
}







Quote Reply
Re: Unable to Modify Record In reply to
In sub parse_form, try removing the line

unless ($value) { next PAIR; }



JPD
Quote Reply
Re: Unable to Modify Record In reply to
JPDeni was correct when she said the way you are using Checkbox fields is not the best way.

Generally checkboxes are only used for yes/no type fields.

Perhaps you should change them to select fields. You can make it a multiple select field which will let them choose more then one option.

Search the forum threads for "muliple select" to find out how to do this.

> >