PHP/MySQL storing/viewing images?
Posted: Thu Apr 14, 2011 1:37 pm
Hello,
I've been given a recent project for a website and am having a difficult time wrapping my head around some of the MySQL processes. I haven't used MySQL much, so I apologize ahead of time for any ignorance.
I believe that I am going to be actually storing the images inside MySQL. Here is my confusion, I think. And, forgive, I have been pouring over PHP/MySQL tutorials, but they always address only one or the other, with regard to forms and upload pages. I would like to create an upload/edit page, that allows my customer to basically add an entry (almost like a news feed, I guess), as well as upload an image. I want the rows to all be tabled down the page, like they are here:
http://www.nwtillers.com/equipment.html
Can I upload a file, INSERT data (or UPDATE, if I create an edit option), all with the same SUBMIT button, then have it dynamically rendered on, say 'equipment.php'.
So far, how I am assuming that this will work, is that I'll have an update.php file, with the actual form,
that sends to a process.php file, that uploads/inserts the data into the database and forwards to an updated.php form, that just prints out if the upload/update was successful.
I am assuming/hoping, that then equipment.php will have been updating to look as it does now, but with this new feature.
I have some code that I'm working on, but I'm still having trouble wrapping my brain around it. I'm not wanting anyone to do my work, more just wanting to know if I'm just looking at the wrong tutorials/missing some functions/or entirely missing some steps. Thanks for the responses!
Matthew
I've been given a recent project for a website and am having a difficult time wrapping my head around some of the MySQL processes. I haven't used MySQL much, so I apologize ahead of time for any ignorance.
I believe that I am going to be actually storing the images inside MySQL. Here is my confusion, I think. And, forgive, I have been pouring over PHP/MySQL tutorials, but they always address only one or the other, with regard to forms and upload pages. I would like to create an upload/edit page, that allows my customer to basically add an entry (almost like a news feed, I guess), as well as upload an image. I want the rows to all be tabled down the page, like they are here:
http://www.nwtillers.com/equipment.html
Can I upload a file, INSERT data (or UPDATE, if I create an edit option), all with the same SUBMIT button, then have it dynamically rendered on, say 'equipment.php'.
So far, how I am assuming that this will work, is that I'll have an update.php file, with the actual form,
that sends to a process.php file, that uploads/inserts the data into the database and forwards to an updated.php form, that just prints out if the upload/update was successful.
I am assuming/hoping, that then equipment.php will have been updating to look as it does now, but with this new feature.
I have some code that I'm working on, but I'm still having trouble wrapping my brain around it. I'm not wanting anyone to do my work, more just wanting to know if I'm just looking at the wrong tutorials/missing some functions/or entirely missing some steps. Thanks for the responses!
Matthew