Hi,
I have a strange problem:
The first part of the script (html_modify_success) works fine when the save_to_server checkbox (in the record form) is NOT checked; the record is shown and the footer links are visible.
But when the save_to_server checkbox is checked (=yes), the record is shown and stored, but the footer (and all the html code after &html_footer;) doesn't show in the viewed page anymore. Why?
It must have something to do with the open/select/close statements...
sub html_modify_success {
# --------------------------------------------------------
.
.
.
|; &html_record_long(&get_record($in{$db_key})); print qq|
</font></p>
|; if ($rec{'save_to_server'} eq 'Yes') { &html_save_server; }
&html_footer; print qq|
</td></tr>
</table>
</center>
</body>
</html>
|;
}
sub html_save_server {
# --------------------------------------------------------
$newfile = "$in{'Userid'}-$in{'ID'}.html";
open(HTM, ">/home/web1/xxx/HTML/arm/$in{'Userid'}/$newfile") or die "This is the error: $!\n";
select (HTM);
print HTM qq|
html code
|;
close(HTM);
}
I have a strange problem:
The first part of the script (html_modify_success) works fine when the save_to_server checkbox (in the record form) is NOT checked; the record is shown and the footer links are visible.
But when the save_to_server checkbox is checked (=yes), the record is shown and stored, but the footer (and all the html code after &html_footer;) doesn't show in the viewed page anymore. Why?
It must have something to do with the open/select/close statements...
sub html_modify_success {
# --------------------------------------------------------
.
.
.
|; &html_record_long(&get_record($in{$db_key})); print qq|
</font></p>
|; if ($rec{'save_to_server'} eq 'Yes') { &html_save_server; }
&html_footer; print qq|
</td></tr>
</table>
</center>
</body>
</html>
|;
}
sub html_save_server {
# --------------------------------------------------------
$newfile = "$in{'Userid'}-$in{'ID'}.html";
open(HTM, ">/home/web1/xxx/HTML/arm/$in{'Userid'}/$newfile") or die "This is the error: $!\n";
select (HTM);
print HTM qq|
html code
|;
close(HTM);
}