Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to save image path to DB?

Status
Not open for further replies.

seahorse123

Programmer
Jul 25, 2005
39
US
How can I save the image path to DB table from a php form, using relative path instead of absolute path? if I create a file upload box, it lets me select image and upload to the server, but that's not I want, I only need a relative path saved to DB.

Any help will be appreciated.

mike
 
I don't understand your question.

Your script must be moving your uploaded file from the temporary directory to a permanent directory that is somewhere within the document root.


Want the best answers? Ask the best questions!

TANSTAAFL!!
 
I don't want to upload images, actually images are already on the server, on the php form, there is a item called "image location", what I need is let user select which image he want to save, then script save the relative path of this image to the database(for example, save the path "/public_html/images/pic1.jpg" to DB), there is nothing related to file upload.

Thanks

mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top