jane_262
01-11-2004, 09:01 PM
I think the problem might be with the Apache server but I am not sure. I am used to using .pl to process my scripts, but for some reason, the error I get is POST not allowed. I use the .cgi extension and Almost everything works. I'd like to display the first variable from each line in a database in a table. It has worked for me in the past using the .pl extension on other servers like this:
<table width="400" border="1" cellpadding="0" cellspacing="0" bordercolor="#666666">
<TBODY>
<COLDEFS><COLDEF>
</COLDEFS><ROWS>
<tr>
<td colstart="1" > </td>
<td colstart="2" > </td>
</tr>
EOF
foreach $lines(@database_array) {
@edit_array = split(/\:/,$lines);
print<<EOF;
<TR><TD
VALIGN="MIDDLE" ALIGN="CENTER" WIDTH="200" COLSTART="1">$edit_array[0]</TD>
EOF
foreach $lines(@database_array2) {
@edit_array2 = split(/\:/,$lines);
print<<EOF;
<TD
VALIGN="MIDDLE" ALIGN="CENTER" WIDTH="200" COLSTART="2">$edit_array2[0]</TD>
</TR>
</rows>
</tbody>
</table>
I open the db in the beginning of the sub like this:
open (DAT,"<$userinfo/011704.db");
if ($LOCK_EX){
flock(DAT, $LOCK_EX); #Locks the file
}
@database_array = <DAT>;
close (DAT);
open (DAT2,"<$nonuserinfo/011704n.db");
if ($LOCK_EX){
flock(DAT2, $LOCK_EX); #Locks the file
}
@database_array2 = <DAT2>;
close (DAT2);
print "Content-type: text/html\n\n";
&header;
print<<EOF;
Any ideas?
<table width="400" border="1" cellpadding="0" cellspacing="0" bordercolor="#666666">
<TBODY>
<COLDEFS><COLDEF>
</COLDEFS><ROWS>
<tr>
<td colstart="1" > </td>
<td colstart="2" > </td>
</tr>
EOF
foreach $lines(@database_array) {
@edit_array = split(/\:/,$lines);
print<<EOF;
<TR><TD
VALIGN="MIDDLE" ALIGN="CENTER" WIDTH="200" COLSTART="1">$edit_array[0]</TD>
EOF
foreach $lines(@database_array2) {
@edit_array2 = split(/\:/,$lines);
print<<EOF;
<TD
VALIGN="MIDDLE" ALIGN="CENTER" WIDTH="200" COLSTART="2">$edit_array2[0]</TD>
</TR>
</rows>
</tbody>
</table>
I open the db in the beginning of the sub like this:
open (DAT,"<$userinfo/011704.db");
if ($LOCK_EX){
flock(DAT, $LOCK_EX); #Locks the file
}
@database_array = <DAT>;
close (DAT);
open (DAT2,"<$nonuserinfo/011704n.db");
if ($LOCK_EX){
flock(DAT2, $LOCK_EX); #Locks the file
}
@database_array2 = <DAT2>;
close (DAT2);
print "Content-type: text/html\n\n";
&header;
print<<EOF;
Any ideas?