Jump to content

Uploading image and retrieving


Guest godilo

Recommended Posts

I need a step by step processes on how to save an image in a server folder such as "picture" and store the path in mysql database. Then i want to echo this image on the web page base on the successful login of that user. Please anybody help me out with this.

Link to comment
Share on other sites

You can figure out how to upload a file by doing a Google search for "php file upload tutorial" or similar. Here's one that looks straight-forward. http://www.zymic.com/tutorials/php/creating-a-file-upload-form-with-php/

 

As long as you understand how to upload a file and get the URL of the file you uploaded, all you have to do is use a simple MySQL insert command to save the file path to the database (http://www.tizag.com/mysqlTutorial/mysqlinsert.php). To display the file, you'll need to get the image path from the database using a select statement (http://www.tizag.com/mysqlTutorial/mysqlselect.php) probably using "where" to specify the exact file you need (http://www.tizag.com/mysqlTutorial/mysqlwhere.php).

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...