Hi there
I have 2 small CF programs and cant understand why the code is not working.
Basically what I am trying to do can be seen on the website:
This is the code from the first program gallery.cfm
<CFIF IsDefined("form.submit")>
<cfinclude template="inc_photo_gallery.cfm">
<br />
<br />
<cfelse>
<cfquery name="qGetGallery" datasource="#request.db_dsn#"
username="#request.db_login#" password="#request.db_pwd#">
SELECT *
FROM galleries
</cfquery>
<form name="photogallery">
<select name="GalleryID">
<option value="Please Select an Image Gallery" selected>Please
Select an Image Gallery</option>
<cfoutput query="qGetGallery">
<option
value="#qGetGallery.GalleryID#">#qGetGallery.galleryname#</option>
</cfoutput>
</select>
<br />
<br />
<input type="submit" name="Submit" value="Display Gallery">
</form>
<br />
<br />
<br />
</p>
</cfif>
The next piece of code is from the include program
<cfquery name="qgetpics" datasource="#request.db_dsn#"
username="#request.db_login#" password="#request.db_pwd#">
select *
from photoadmin
<cfif form.galleryid eq '1'>
where galleryid = '1' and onweb = '1'
</cfif>
<cfif form.galleryid eq '2'>
where galleryid = '2' and onweb = '1'
</cfif>
<cfif form.galleryid eq '3'>
where galleryid = '3' and onweb = '1'
</cfif>
<cfif form.galleryid eq '4'>
where onweb = '1'
</cfif>
</cfquery>
<p><div class="gallery"><cfoutput query="qgetpics"><a
href="data/images/#pic_large#" rel="lightbox[sample]" title="Yeng Tan Floral
design"><img src="data/thumbnails/#pic_thumbnail#" border="0"
/></a></cfoutput><!--[if lte IE 6]><script src="engine/js/pngfix_vlb.js"
type="text/javascript"></script><![endif]-->
</div></p>
www.yengtanfloraldesigner.com.au/gallery.cfm
Thanks in advance for feedback - I expect its probably just something dumb that
I have forgotten as I havent been doing much coding lately.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know
on the House of Fusion mailing lists
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:325510
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4