RhysAndrews Posted January 31, 2009 Share Posted January 31, 2009 Hey guys. My client has a lightbox-style photo gallery, and at the bottom of each photos is a 'photo code' - it's actually just the file name minus the extension. She now wants an order form, where clients can submit photos they'd like to order, as well as options like colour or black/white, size, and so on. Once they submit the form, the info just goes to my client via email and she gets in touch with them. I'm trying to get my head around how I can associate the lightbox gallery with an HTML Form (which is processed in PHP when submitted). It would be nice if customers can just click a '+' button to add a new row if they want to order additional photos, however I must also figure out how the customers identify which photo they want to order from the gallery. They could just enter the photo code from the gallery, but they could get tedious if they're ordering multiple photos. Ideally, I'd like to know how to have a button that automatically enters data photo code into the first empty row. What can you guys suggest? Sorry if I am not clear! -Rhys Quote Link to comment https://forums.phpfreaks.com/topic/143216-solved-help-with-order-forms/ Share on other sites More sharing options...
npsari Posted January 31, 2009 Share Posted January 31, 2009 I am not sure exactly what you are after, however, from what i understand, this may be a little tricky Because if a visitor is configuring many pictures, like choosing black and white, etc, then, you need to save the details of each picture separately And when the user is done, he/she can simply click on Submit-Order button, which will send your client a list of photos and the configuration of each photo at the buttom of it You see what i mean, so, you will have to store the details of each photo separately I hope i am correct I think this can be done easily using PHP, because you can find many ways around it Quote Link to comment https://forums.phpfreaks.com/topic/143216-solved-help-with-order-forms/#findComment-751091 Share on other sites More sharing options...
RhysAndrews Posted January 31, 2009 Author Share Posted January 31, 2009 I wasn't planning on having the photos as attachments to the email - just their 'photo codes'. Detecting how many rows were provided in PHP and sending all the values is potentially difficult, so I am happy to just have a fixed number of rows, i.e 10. The main issue for me is how can the viewer open the photo and click a button or something to 'add' that photo's code to a row? Quote Link to comment https://forums.phpfreaks.com/topic/143216-solved-help-with-order-forms/#findComment-751096 Share on other sites More sharing options...
npsari Posted January 31, 2009 Share Posted January 31, 2009 Ohh, i i think i see what you mean Well, if i was in your case, i would try to use AJAX, but i dont know much about AJAX So, I would put an Iframe at the buttom of each image, this Iframe has a form which shows a button This button says 'ADD IMAGE' When the visitor likes an image, he/she clicks on the button, the main page will not load, however, only the Iframe will load A message will appear to the visitor saying, This image has been added to your choices Quote Link to comment https://forums.phpfreaks.com/topic/143216-solved-help-with-order-forms/#findComment-751114 Share on other sites More sharing options...
RhysAndrews Posted January 31, 2009 Author Share Posted January 31, 2009 @npsari That sounds like exactly what I am hoping for in design, I just need technical help. Thanks very much! -Rhys Quote Link to comment https://forums.phpfreaks.com/topic/143216-solved-help-with-order-forms/#findComment-751124 Share on other sites More sharing options...
RhysAndrews Posted January 31, 2009 Author Share Posted January 31, 2009 Solved! I created checkboxes for each photo, which is named photo0, photo1, and so on. You can go up to as many photos as you like, because the PHP script just searches through photo0, 1, 2, etc until it reaches the number of photos that exist. Then, I just use checkboxes and radio buttons and the like for sizes and colour. Regards Rhys Andrews Quote Link to comment https://forums.phpfreaks.com/topic/143216-solved-help-with-order-forms/#findComment-751631 Share on other sites More sharing options...
npsari Posted February 1, 2009 Share Posted February 1, 2009 wow, can you show me the site if you dont mind I am interested to see how it looks like now If you want to - obviosuly Glad that you found an answer Quote Link to comment https://forums.phpfreaks.com/topic/143216-solved-help-with-order-forms/#findComment-752109 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.