I have two questions, and I'm a newbie in CF, so be patient.
1.- I'm ok on upload an image an positioning it in an specific folder.
But when I tried to <cfoutput> gave me an error.
========
This is my action page for record:
<CFFILE ACTION="Upload" FILEFIELD="noticia_foto" DESTINATION="c:\inetpub\ NAMECONFLICT="MakeUnique">
<cfquery datasource="portal">
insert into noticias
(noticia_epigrafe,noticia_titulo,noticia_lead,category_id,noticia_cuerpo,fecha_posteo, fecha_expiracion) values
('#form.noticia_epigrafe#','#form.noticia_titulo#','#form.noticia_lead#','#form.category_id#','#form.noticia_cuerpo#','#form.fecha_posteo#','#form.fecha_expiracion#')
</cfquery>
========
This is the form that modifies the data, extract it and modify it.
<cfquery name="qry_noticia_alterar" datasource="portal">
select * from noticias
where noticia_id = #url.noticia_id#
</cfquery>
<cfoutput query="qry_noticia_alterar">
<form action="update.cfm"...etc>
<tr bgcolor="##003366">
<td>
<blockquote>
<p>Fotografía:</p>
</blockquote>
</td>
<td><input type="file" name="noticia_foto" value="#qry_noticia_alterar.noticia_foto#">
</td>
</tr>
</form>
</cfoutput>
And obvoiusly between a form action, etc.
I would like to extract the picture, image either before you could change it to other image.
====
But this page gave an error in upgrade action
I used this page (update.cfm) to do that
<CFFILE ACTION="Upload" FILEFIELD="noticia_foto" DESTINATION="c:\inetpub\ NAMECONFLICT="overwrite" >
<cfquery datasource="portal">
update noticias
set noticia_epigrafe = '#form.noticia_epigrafe#',
noticia_titulo = '#form.noticia_titulo#',
noticia_lead = '#form.noticia_lead#',
category_id = '#form.category_id#',
noticia_cuerpo = '#form.noticia_cuerpo#',
fecha_expiracion = '#form.fecha_expiracion#'
where noticia_id = #form.noticia_id#
</cfquery>
=============
I would like to store an image then extract it and see if the correct so I could have the possibility to change it and upload another. That it's the only thing I want.
Thanks in advance
;-)
1.- I'm ok on upload an image an positioning it in an specific folder.
But when I tried to <cfoutput> gave me an error.
========
This is my action page for record:
<CFFILE ACTION="Upload" FILEFIELD="noticia_foto" DESTINATION="c:\inetpub\ NAMECONFLICT="MakeUnique">
<cfquery datasource="portal">
insert into noticias
(noticia_epigrafe,noticia_titulo,noticia_lead,category_id,noticia_cuerpo,fecha_posteo, fecha_expiracion) values
('#form.noticia_epigrafe#','#form.noticia_titulo#','#form.noticia_lead#','#form.category_id#','#form.noticia_cuerpo#','#form.fecha_posteo#','#form.fecha_expiracion#')
</cfquery>
========
This is the form that modifies the data, extract it and modify it.
<cfquery name="qry_noticia_alterar" datasource="portal">
select * from noticias
where noticia_id = #url.noticia_id#
</cfquery>
<cfoutput query="qry_noticia_alterar">
<form action="update.cfm"...etc>
<tr bgcolor="##003366">
<td>
<blockquote>
<p>Fotografía:</p>
</blockquote>
</td>
<td><input type="file" name="noticia_foto" value="#qry_noticia_alterar.noticia_foto#">
</td>
</tr>
</form>
</cfoutput>
And obvoiusly between a form action, etc.
I would like to extract the picture, image either before you could change it to other image.
====
But this page gave an error in upgrade action
I used this page (update.cfm) to do that
<CFFILE ACTION="Upload" FILEFIELD="noticia_foto" DESTINATION="c:\inetpub\ NAMECONFLICT="overwrite" >
<cfquery datasource="portal">
update noticias
set noticia_epigrafe = '#form.noticia_epigrafe#',
noticia_titulo = '#form.noticia_titulo#',
noticia_lead = '#form.noticia_lead#',
category_id = '#form.category_id#',
noticia_cuerpo = '#form.noticia_cuerpo#',
fecha_expiracion = '#form.fecha_expiracion#'
where noticia_id = #form.noticia_id#
</cfquery>
=============
I would like to store an image then extract it and see if the correct so I could have the possibility to change it and upload another. That it's the only thing I want.
Thanks in advance
;-)