| | |
get sets of info from db depending on hidden field's value
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
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
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
Break the process into small segments.
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.
- handling form submissions with php
- smart database design structure tutorials
- mysql sql query structures
- connecting to a database with php
- working with strings in php
- 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.
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
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
![]() |
Other Threads in the PHP Forum
- Previous Thread: using a variable to name the table in the CREATE TABLE function
- Next Thread: Web Service in PHPٌ
| Thread Tools | Search this Thread |
Tag cloud for PHP
.htaccess access ajax apache api array beginner binary body broken cakephp checkbox class cms code cron curl database date date/time directory display download dynamic echo email error file files folder form forms function functions google href htaccess html image include insert integration ip java javascript joomla limit link list login loop mail menu mlm mod_rewrite msqli_multi_query multiple mycodeisbad mysql oop parse paypal pdf php problem query radio random recursion regex remote script search send seo server sessions sms soap source space sql static structure syntax system table tutorial update upload url validation validator variable video web webdesign wordpress xml youtube





