Gossamer Forum
Home : Products : DBMan SQL : Discussion :

Re: [TheStone] multiple file upload

Quote Reply
Re: [TheStone] multiple file upload In reply to
Okay I think I'm doing something wrong. Here's the code for my record_add_form.html

Code:


...code up here....

<TD vAlign=
top align=right width="191" bordercolor="#003063" bgcolor="#003063" bordercolorlight="#003063" bordercolordark="#003063" height="27"><FONT face=Tahoma,Arial,Helvetica

size=
2 color="#FFFFFF"><b>Attachment(s):</b></FONT></TD>

<form name=
"myform" action="db.cgi" method=post <%if enctype%><%enctype%><%endif%>>

<TD vAlign=
top align=left width="226" bordercolor="#003063" bgcolor="#003063" bordercolorlight="#003063" bordercolordark="#003063" height="27"><FONT face=Tahoma,Arial,Helvetica size=2>



<INPUT type=
file name=attachedfile value=""></FONT></TD>

<TD vAlign=
top align=left width="232" bordercolor="#003063" bgcolor="#003063" bordercolorlight="#003063" bordercolordark="#003063" height="27"><FONT face=Tahoma,Arial,Helvetica size=2>

<INPUT type=
file name=attachedfile2 value=""></FONT></TD>

</tr>

<tr>

<TD vAlign=
top align=right width="191" bordercolor="#003063" bgcolor="#003063" bordercolorlight="#003063" bordercolordark="#003063" height="27">&nbsp;</TD>

<TD vAlign=
top align=left width="226" bordercolor="#003063" bgcolor="#003063" bordercolorlight="#003063" bordercolordark="#003063" height="27"><FONT face=Tahoma,Arial,Helvetica size=2>

<INPUT type=
file name=attachedfile3 value=""></FONT></TD>

<TD vAlign=
top align=left width="232" bordercolor="#003063" bgcolor="#003063" bordercolorlight="#003063" bordercolordark="#003063" height="27"><FONT face=Tahoma,Arial,Helvetica size=2>

<INPUT type=
file name=attachedfile4 value=""></FONT></TD>

</tr>

<tr>

<TD vAlign=
top align=right width="191" bordercolor="#003063" bgcolor="#003063" bordercolorlight="#003063" bordercolordark="#003063" height="1">&nbsp;</TD>

<TD vAlign=
top align=left width="226" bordercolor="#003063" bgcolor="#003063" bordercolorlight="#003063" bordercolordark="#003063" height="1"><FONT face=Tahoma,Arial,Helvetica size=2>

<INPUT type=
file name=attachedfile5 value=""></FONT></TD>

<TD vAlign=
top align=left width="232" bordercolor="#003063" bgcolor="#003063" bordercolorlight="#003063" bordercolordark="#003063" height="1"><FONT face=Tahoma,Arial,Helvetica size=2>



</tr>

</TBODY>

</TABLE>


And this is what I have for my record_modify_form.html

Code:


...code up here....

<TD vAlign=
top align=right width="150" bordercolor="#003063" bgcolor="#003063" bordercolorlight="#003063" bordercolordark="#003063"><FONT face=Tahoma,Arial,Helvetica

size=
2 color="#FFFFFF"><b>Attachment:</b></FONT></TD>

<TD vAlign=
top align=left width="481" bordercolor="#003063" bgcolor="#003063" bordercolorlight="#003063" bordercolordark="#003063"><FONT face=Tahoma,Arial,Helvetica size=2>

<P>

<form name=
"myform" action="db.cgi" method=post <%if enctype%><%enctype%><%endif%>>

<%if attachedfile%>


<a href=
"db.cgi?src=db&cn=attachedfile&do=download_file&id=<%primary_key%>&db=<%db%>&fname=<%attachedfile%>">download</a>

<a href=
"db.cgi?src=db&cn=attachedfile&do=view_file&id=<%primary_key%>&db=<%db%>&fname=<%attachedfile%>">view</a>

<input type=
checkbox name="attachedfile_del" value="delete"> Delete<BR>

<%else%>


<input type=
file name="attachedfile">

<%endif%>


<br>


<%if attachedfile2%>


<a href=
"db.cgi?src=db&cn=attachedfile2&do=download_file&id=<%primary_key%>&db=<%db%>&fname=<%attachedfile2%>">download</a>

<a href=
"db.cgi?src=db&cn=attachedfile2&do=view_file&id=<%primary_key%>&db=<%db%>&fname=<%attachedfile2%>">view</a>

<input type=
checkbox name="attachedfile2_del" value="delete"> Delete<BR>

<%else%>


<input type=
file name="attachedfile2">

<%endif%>


<br>


<%if attachedfile3%>


<a href=
"db.cgi?src=db&cn=attachedfile3&do=download_file&id=<%primary_key%>&db=<%db%>&fname=<%attachedfile3%>">download</a>

<a href=
"db.cgi?src=db&cn=attachedfile3&do=view_file&id=<%primary_key%>&db=<%db%>&fname=<%attachedfile3%>">view</a>

<input type=
checkbox name="attachedfile3_del" value="delete"> Delete<BR>

<%else%>


<input type=
file name="attachedfile3">

<%endif%>


<br>


<%if attachedfile4%>


<a href=
"db.cgi?src=db&cn=attachedfil4e&do=download_file&id=<%primary_key%>&db=<%db%>&fname=<%attachedfile4%>">download</a>

<a href=
"db.cgi?src=db&cn=attachedfile4&do=view_file&id=<%primary_key%>&db=<%db%>&fname=<%attachedfile4%>">view</a>

<input type=
checkbox name="attachedfile4_del" value="delete"> Delete<BR>

<%else%>


<input type=
file name="attachedfile4">

<%endif%>


<br>


<%if attachedfile5%>


<a href=
"db.cgi?src=db&cn=attachedfile5&do=download_file&id=<%primary_key%>&db=<%db%>&fname=<%attachedfile5%>">download</a>

<a href=
"db.cgi?src=db&cn=attachedfile5&do=view_file&id=<%primary_key%>&db=<%db%>&fname=<%attachedfile5%>">view</a>

<input type=
checkbox name="attachedfile5_del" value="delete"> Delete<BR>

<%else%>


<input type=
file name="attachedfile5">

<%endif%>


I'm not sure about the modify form code since I can't add records. When I try to add a record with an attachment I get the following error:

Problems adding record: Failed to execute query: 'INSERT INTO reeCC_Files (File_Name,ForeignColName,ForeignColKey,File_MimeType,File_Size,File_Directory,ID) VALUES (?,?,?,?,?,?,NULL)' Reason: Table 'dbman.reeCC_Files' doesn't exist

If I don't attach a file then everything goes through perfectly; otherwise, the above message is displayed.


Reena

Last edited by:

Reena0330: Aug 27, 2002, 3:04 PM
Subject Author Views Date
Thread multiple file upload Reena0330 10895 Aug 26, 2002, 12:21 PM
Thread Re: [Reena0330] multiple file upload
604 10743 Aug 26, 2002, 12:32 PM
Thread Re: [TheStone] multiple file upload
Reena0330 10684 Aug 26, 2002, 12:55 PM
Thread Re: [Reena0330] multiple file upload
Paul 10685 Aug 26, 2002, 1:04 PM
Thread Re: [Paul] multiple file upload
Reena0330 10715 Aug 26, 2002, 1:38 PM
Thread Re: [Reena0330] multiple file upload
604 10669 Aug 26, 2002, 1:52 PM
Thread Re: [TheStone] multiple file upload
Reena0330 10683 Aug 26, 2002, 1:53 PM
Thread Re: [Reena0330] multiple file upload
604 10698 Aug 26, 2002, 2:15 PM
Post Re: [TheStone] multiple file upload
Reena0330 10685 Aug 26, 2002, 2:27 PM
Thread Re: [TheStone] multiple file upload
Reena0330 10655 Aug 26, 2002, 5:45 PM
Thread Re: [Reena0330] multiple file upload
604 10645 Aug 27, 2002, 10:42 AM
Thread Re: [TheStone] multiple file upload
Reena0330 10634 Aug 27, 2002, 12:35 PM
Thread Re: [Reena0330] multiple file upload
604 10630 Aug 27, 2002, 2:21 PM
Thread Re: [TheStone] multiple file upload
Reena0330 10655 Aug 27, 2002, 3:02 PM
Thread Re: [Reena0330] multiple file upload
604 10660 Aug 27, 2002, 3:23 PM
Post Re: [TheStone] multiple file upload
assombracao 10286 Nov 28, 2002, 10:36 AM