Guest godilo Posted November 15, 2010 Report Share Posted November 15, 2010 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. Quote Link to comment Share on other sites More sharing options...
falkencreative Posted November 15, 2010 Report Share Posted November 15, 2010 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). Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.