I can't stand it. That's all it was.
Plus, it was not the LWP URL Checker that was causing the problem. It was the
Automatic Duplicate URL Checker that was causing some of the configuration probs. I installed this long ago because of many similar submissions and completely forgot about it.
I changed to:
Code:
if ($in{'submit_form'}) {
&process_form;
}
elsif ($in{'send_form'}) {
&send_form;
}
There's no:
Code:
else {
&site_html_modify_form;
}
at the end, as shown in the original directions at the start of this thread. Just below, I provided the entire
sub main that works for me. It uses the above-mentioned simple change.
Everything works. Thanks, AnthroRules!
So, for anyone trying to combine:
1.
Password Mod (Phoenix) - Resource Center
2.
modify.cgi Confirmation Page hack above (AnthroRules) derived from the
Add Confirmation Mod (Phoenix) - Resource Center
3.
Automatic Duplicate URL Checker (Gerrit Jahn) - Resource Center
Here's the
total sub main that works for me. I use the piece of
sub main that AnthroRules provides at the bottom of this thread, not the one the top:
Code:
sub main {
### --------------------------------------------------------
local (%in) = &parse_form;
### We are processing the form.
if ($in{'submit_form'}) {
&process_form;
}
elsif ($in{'send_form'}) {
&send_form;
}
### Otherwise we are displaying the form (in site_html.pl), displaying
### the entrance (Asks for Link ID and Password)
else {
if ($in{'ID'} =~ /^\d+$/) {
my (%rec) = &get_record ($in{'ID'});
if ($rec{$db_key} eq $in{'ID'}) {
if ($rec{'password'} eq $in{'password'}) {
&site_html_modify_form (%rec);
}
else {
&site_html_modify_failure ("Password Invalid: $in{'password'}");
}
}
else {
&site_html_modify_failure ("Unkown Link ID: $in{'ID'}");
}
}
else {
&site_html_modify_first;
}
}
}
Then, for
modify_first.html: Code:
<INPUT TYPE="Submit" VALUE="Submit">
for
modify.html: Code:
<input type="SUBMIT"
name="submit_form" value="Modify Resource">
This is different than what AnthroRules has above. I found that if I used name="process_form", the
Automatic Duplicate URL Checker routine would run in db_utils.pl and return a "Duplicate URL error - already listed!" error. That's why modify.html had to be changed to name="submit_form".
for
modify_confirm.html: Code:
<input type="SUBMIT" name="send_form" value="Modify Resource">
Then, follow the rest of the directions by AnthroRules and the authors of the other mods.
BTW, I looked at the multi-page add.cgi. It looks great. I use some multi-page forms using AlienForm 2, and they are very helpful. Breaking things up makes it easier on your visitors, and it gives the site a more professional look. Super nice !
Thanks, again, for your help.
This one was really nagging me. I hope my note here helps.
[This message has been edited by DogTags (edited May 12, 2000).]
[This message has been edited by DogTags (edited May 12, 2000).]