Hi all =]

I have a php script which gets the file name of every .jpg file in a folder and then writes the <img>, and a form. The script uses a string called "galleryarray" to store the filename, which is then called into a hidden field so when the form is submitted, the next page knows what picture the user selected.

what i want is a php script on the next page which returns all of the information about the "galleryarray" hidden field's value (the picture the user selected) from a database.

Im not sure how to go about this - Where to store the information (seperate databases, tables or just fields etc), how to do a search query or how to call groups of values from a database...

Im open to suggestions but you should probably know that i have only just been able to connect my web page to my database for the first time (after a long ... LONG time of trying) about 2 hours ago. Since then I have been messing around with login page tut's with no success...! haha. so yeah, keep it simple please im not advanced at all in my mysql (or php) knowledge xD So code snippits or links to tut's i can use would be really good :D

Thanks so much.. :)

Max

Break the process into small segments.

  1. handling form submissions with php
  2. smart database design structure tutorials
  3. mysql sql query structures
  4. connecting to a database with php
  5. working with strings in php
  6. looping through database results in php

and use google for each step, you can literally copy the words that I have put down and use them in the google search textbox.

okay thanks a lot :) Ill let you know how i get on. :)

Hey again,

Iv managed to get used to the CREAT TABLE, INSERT and SELECT functions and so iv decided that when i put up the details for a new picture ill create a table with the file name of the new picture (excluding the .jpg at the end) and then when I need to bring back the details using the hidden field's value i just get all of the contents of the table that has the name thats the same as that hidden field value. So it should all work fine. Im having a few learning curves along the way but i should be fine :)

Thanks for the guidance.

Max

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.