whoa u got all kinds of trouble here!
first off /home/auto1/autocomm-inc.com/html/dev/ isnt a valid linux path
assuming that the linux box is running an apache server, the root folder will
be located within the htdocs folder, that alone will mess it up
like i said ask your host
then u need to really upload the pix before u start doing inserts and also trim
your form fields before the inserts as well also should use cfqueryparam
then when ur uploading more than 1 file field there is a problem
#file.serverfile# can only be used once
so u need to set it as a variable if there is more than 1 image being uploaded
<!--- do the file 1 upload now --->
<cfif #form.picture1# NEQ "">
<cffile Action="upload"
filefield="picture1"
destination="#upload#"
nameconflict="makeunique"
accept="image/*">
<cfset picture1 = #file.serverfile#>
</cfif>
<!--- do the file 2 upload now --->
<cfif #form.picture2# NEQ "">
<cffile Action="upload"
filefield="picture2"
destination="#upload#"
nameconflict="makeunique"
accept="image/*">
<cfset picture2 = #file.serverfile#>
</cfif>
<!--- do the file 3 upload now --->
<cfif #form.picture3# NEQ "">
<cffile Action="upload"
filefield="picture3"
destination="#upload#"
nameconflict="makeunique"
accept="image/*">
<cfset picture3 = #file.serverfile#>
</cfif>
<!--- do the file 4 upload now --->
<cfif #form.picture4# NEQ "">
<cffile Action="upload"
filefield="picture4"
destination="#upload#"
nameconflict="makeunique"
accept="image/*">
<cfset picture4 = #file.serverfile#>
</cfif>
<!--- do the file 5 upload now --->
<cfif #form.picture5# NEQ "">
<cffile Action="upload"
filefield="picture5"
destination="#upload#"
nameconflict="makeunique"
accept="image/*">
<cfset picture5 = #file.serverfile#>
</cfif>
do u see how it is setting a variable if the file field has a photo?
what kinda db are u using?
if ur on linux im assuming its mysql and u will need a username and password as
well
then why use this?
<SCRIPT LANGUAGE="JavaScript">
> self.location ='admin_test.cfm?type=testimonials';
> </SCRIPT>
just use cflocation
personally i dont see how this is working at all on your local machine
---------- Original Message ----------------------------------
From: "Eric Creese" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Date: Fri, 12 Nov 2004 15:52:42 -0600
>here is my code
>
>Application.cfm
>---------------
><CFSET directorypath ="/home/auto1/autocomm-inc.com/html/dev/">
><CFPARAM name="session.LoggedIn" DEFAULT="FALSE">
>
>x_addtest.cfm
>-------------
><cfquery datasource="autoadmin" name="InsertTest">
> INSERT INTO testimonials(
>
> tfeature,biz_name,test_name,test_pos,trank,tindustry,display,test_desc,displayscroller,tfeature2)
> VALUES (
>
> 'No','#form.biz_name#','#form.test_name#','#form.test_pos#',#form.trank#,'#form.tindustry#','#form.display#','#form.test_desc#','#form.displayscroller#','#form.tfeature2#');
> </cfquery>
>
> <cfquery datasource="autoadmin" name="GetLast">
> SELECT MAX(test_id) as lastID
> FROM testimonials
> WHERE biz_name = '#form.biz_name#'
> </cfquery>
>
> <cfif isdefined('form.timage1')>
> <cfif #form.timage1# NEQ ''>
> <cffile action="upload"
> destination="#directorypath#images/apps/"
> nameconflict="makeunique"
> filefield="timage1"
> mode = "777"
> accept="image/*">
>
> <cfquery name="Update1" datasource="autoadmin">
> UPDATE testimonials
> SET timage1 = '#ServerFile#'
> WHERE test_ID = #GetLast.lastID#
> </cfquery>
> </cfif>
> </cfif>
>
> <cfif isdefined('form.timage')>
> <cfif #form.timage# NEQ ''>
> <cffile action="upload"
> destination="#directorypath#images/signboar/"
> nameconflict="makeunique"
> filefield="timage"
> accept="image/*">
>
> <cfquery name="Update" datasource="autoadmin">
> UPDATE testimonials
> SET timage = '#ServerFile#'
> WHERE test_ID = #GetLast.lastID#
> </cfquery>
> </cfif>
> </cfif>
>
>
> <!-- Warn users -->
> <SCRIPT LANGUAGE="JavaScript">
> alert('You successfully added the Testimonial.');
> </SCRIPT>
>
> <SCRIPT LANGUAGE="JavaScript">
> self.location ='admin_test.cfm?type=testimonials';
> </SCRIPT>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:184183
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54