On Mon, Aug 17, 2009 at 7:18 PM, Toby King<ptansw...@gmail.com> wrote: > > 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
You had no action or method on your form Try this: <CFIF IsDefined("form.submit")> <cfinclude template="inc_photo_gallery.cfm"> <cfelse> <cfquery name="qGetGallery" datasource="#request.db_dsn#" username="#request.db_login#" password="#request.db_pwd#"> SELECT * FROM galleries </cfquery> <form action="gallery.cfm" method="post" name="photogallery" id="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> </cfif> <cfquery name="qgetpics" datasource="#request.db_dsn#" username="#request.db_login#" password="#request.db_pwd#"> select * from photoadmin <cfif isdefined("form.galleryid"> where galleryid = #form.galleryid# and onweb = '1' <cfelse> 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> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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:325513 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4