JPDeni,
This mod does work nicely.
Code:
$in{'Userid'} = $db_userid;
my ($status, @hits) = &query("mod");
unless ($status eq 'ok') { &html_add_form; return;}
However after much troubleshooting, I found that it causes errors in my database file. Some side effects are: other count routines don't count very well. And when I try to import the file into access, I can see a thick black line between records. This wierd character is causing the errors.
I've tried used Edit Plus to strip any trailing spaces, I've saved it as Unix format, I've uploaded it numerous times in ascii mode, but the db file is just messed up. I have repeated the experiment by starting with fresh 0 byte db files and it happens when I add a record with this 3 line code.
If the code is #rem'ed out, I have no problems. Is the file being written to improperly, not closed, are these the control ^m's I hear about ? Any ideas ?
BTW, if I rem out this line:
$in{'Userid'} = $db_userid;
The file corruption stops, but then the code doesn't do it's job, because it takes everyone to &html_add_form.
Any ideas ?