Hello...
I have a form that inserts data with an option to insert an image... is there some code that allows you to insert a default no image file incase they leave the image field blank?
<cfset file1 = #CFFILE.serverfile#>
<cfset img_path = 'Images/gallery/Items/#file1#'>
<CFQUERY name="insertrequest" DATASOURCE="#request.dsn#">
Insert Into ItemDirectory
(
Item,
Description,
Image
)
values
(
'#form.Item#',
'#form.Description#',
'#img_path#'
)
</CFQUERY>
I have a form that inserts data with an option to insert an image... is there some code that allows you to insert a default no image file incase they leave the image field blank?
<cfset file1 = #CFFILE.serverfile#>
<cfset img_path = 'Images/gallery/Items/#file1#'>
<CFQUERY name="insertrequest" DATASOURCE="#request.dsn#">
Insert Into ItemDirectory
(
Item,
Description,
Image
)
values
(
'#form.Item#',
'#form.Description#',
'#img_path#'
)
</CFQUERY>