My objective:
Upload a an image that gets uploaded through a form with a attribute or name of 'file' and it saves into the /prod_img/ folder after uploading.
THAT WORKS PERFECTLY; HOWEVER I JUST NEED TO GET A CODE OR QUERY THAT WILL INSERT THAT IMAGE, uploaded as 'file' (or better yet a url link to that image) INTO THE SQL DB TABLE NAMED " pr_base_pics " under the column named " pic_name " and associate with the "base_id" of a product that was created. I am just adding pictures, but want o be able to have it associated with its manufacturer, style, and other query methods that follow over the three tables...
I think I can generate a frontside code that calls the query to display what I want within the query filters, but just need to be sure of how to make sure the 'file' uploaded is stored and associated correctly.
I have this below in the PHP page that uploads the product image and know it is wrong:
// These three lines now put everything into the table.
$dbQuery = "INSERT INTO pr_base_pics VALUES ";
$dbQuery .= "(0, '$strDesc', '$fileContent', '$fileUpload_type')";
mysql_query($dbQuery) or die("Couldn't add file to database");
So in essence I need to know how the image, or file to the folder with the image name, gets written into the DB TABLE of pr_base_pics under the second column labeled pic_name....
Can you guide me to a query string that will do that as I know the above is not correct as it was generated from a computer tool and does not even show the correct string or item 'file' that I see.. But I am a novice and that is why I am seeking GREATER MINDS!!
Thanks in advance!!,
JD