I am trying to get my code working so that I can store the path of an uploaded picture onto a table so that I can call upon the uploaded file whenever I need it.
So what happens on the web page is, a person enters information on a vehicle and they click submit to enter the information onto our database. Then after that they are taken to another page that I am trying to set up to be referenced to that specific vehicle entry using the entry ID, on this page the person will be able to upload photos of the vehicle to our web server which will be stored in a folder and I would like to be able to pull off of it an upload ID and the path to access the photo and store it in another table that will hold the vehicles ID in the vehicle table and then the photos id in the photo table and the path to access the photo all of course in their own separate columns in the photo table so that on the page that results, I can display the vehicle information with a main picture decided by its reference ID matching the vehicle ID and the picture ID being the lowest in the sequence that is attached to that vehicle's ID number. Then I would like to be able to display the remaining photoes if there are any in a grid so that others can view them at their liesure. I would also like to be able to run a slide show that shows the main pictures of each vehicle stored on the database using the same method used to display the main picture of the vehicle
Hey GraficRegret, welcome to Daniweb :)
Your description sounds like a typical use of PHP and MySql, but what help do you specifically need? Is there some code you need some assistance with? Are you looking for general considerations and tips from those who already walked that road?
Thanks for the welcome, I am looking for maybe some direction as to where I might find some answers, I am trying to learn how to do this all myself and thus far have had no success finding any direciton on this problem searching W3 Schools, PHP Manual, and other similar sights, I always find and now understand how to set up an upload and how to move it to a desired folder for storeage but everywhere I have looked gives no disernable solution to taking the path that is created that referes to that specific upload and inserting it into a table I created to be able to join with the table holding the vehicle information.
Thank you sir I will try that, any clues as to where I can find a way to pull the id of the refering vehicle entry? or should that be a paramiter that I pass into a the insert when I set it up for the picture table?
Everything I have been getting for inserting the vehicle ID into a table for reference, so that the pictures are matched propperly to the vehicles, looks to be a temperary fix, because the code would change the next time it was called and if someone pulled up and tried to add pictures to a previous entry the reference ID would have changed. where am I going wrong?
Ok so i figured out what I need to do, its just a matter now of using the php coding to open a new web page to call the information up that I need in order to store it in the new table. So simple, I dont know why I didnt see it sooner. However I am not finding the function to open a web page, do you have any idea what the function is called? Or am I just being stupid again and its fopen()?
You need to run the file as php file - change the extension from .html to .php or modify your .htaccess file as explained in my previous post. I suggest the first option (change extension). Do that, see if there are any errors THEN come back.