get sets of info from db depending on hidden field's value

Thread Solved

Join Date: Oct 2006
Posts: 203
Reputation: MaxMumford is an unknown quantity at this point 
Solved Threads: 2
MaxMumford's Avatar
MaxMumford MaxMumford is offline Offline
Posting Whiz in Training

get sets of info from db depending on hidden field's value

 
0
  #1
Jun 25th, 2008
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

Thanks so much..

Max
Ill solve somebody's thread someday! xD
Reply With Quote Quick reply to this message  
Join Date: Jun 2008
Posts: 849
Reputation: R0bb0b is on a distinguished road 
Solved Threads: 67
R0bb0b's Avatar
R0bb0b R0bb0b is offline Offline
Practically a Posting Shark

Re: get sets of info from db depending on hidden field's value

 
0
  #2
Jun 25th, 2008
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.
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 203
Reputation: MaxMumford is an unknown quantity at this point 
Solved Threads: 2
MaxMumford's Avatar
MaxMumford MaxMumford is offline Offline
Posting Whiz in Training

Re: get sets of info from db depending on hidden field's value

 
0
  #3
Jun 26th, 2008
okay thanks a lot Ill let you know how i get on.
Ill solve somebody's thread someday! xD
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 203
Reputation: MaxMumford is an unknown quantity at this point 
Solved Threads: 2
MaxMumford's Avatar
MaxMumford MaxMumford is offline Offline
Posting Whiz in Training

Re: get sets of info from db depending on hidden field's value

 
0
  #4
Jul 1st, 2008
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
Ill solve somebody's thread someday! xD
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for PHP
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC