Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > Beginning PHP
| Search | Today's Posts | Mark Forums Read
Beginning PHP Beginning-level PHP discussions. More advanced coders should post to the Pro PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning PHP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old February 22nd, 2007, 08:53 AM
Authorized User
 
Join Date: Jan 2007
Location: , , .
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default uploading an image to a database

how can i upload an image file from a directory on my hard disk to a MySQL database??? HELP!!! (i'm using winXP) thanx

  #2 (permalink)  
Old February 23rd, 2007, 10:03 AM
Friend of Wrox
 
Join Date: Nov 2005
Location: Rotterdam, , Netherlands.
Posts: 223
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

You can't store an image into a database. You store an image onto a disk. The solution is to upload the image into a folder and at the same time safe the url of the image location into the database.

__________________________________________________ ________
I am DJ Kat...that's my name. Its a D and a J and a Kat with a K.
  #3 (permalink)  
Old February 24th, 2007, 05:01 PM
Authorized User
 
Join Date: Jan 2007
Location: , , .
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

how do you do that?

  #4 (permalink)  
Old February 25th, 2007, 10:39 AM
Friend of Wrox
 
Join Date: Nov 2005
Location: Rotterdam, , Netherlands.
Posts: 223
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

You must separate this in two sections.
1.You need to be able to insert text into a mysql database with php.
2.You need to be able to upload an image.

Find tutorials how you can do this there are enough online.
When you have accomplished these you need to combine these but thats that comes later first try these two things i have mentioned.

__________________________________________________ ________
I am DJ Kat...that's my name. Its a D and a J and a Kat with a K.
  #5 (permalink)  
Old February 27th, 2007, 03:44 AM
Authorized User
 
Join Date: Jan 2007
Location: , , .
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

i'v accomplished the 2 sections what next?



Similar Threads
Thread Thread Starter Forum Replies Last Post
Default image generation while uploading an image! ostwald ASP.NET 2.0 Professional 1 September 12th, 2007 01:44 AM
Retrieving and uploading image in Database vijay_83 ASP.NET 2.0 Basics 1 October 4th, 2006 03:25 PM
Uploading Image shurabhavesh ASP.NET 2.0 Basics 0 April 21st, 2005 05:49 AM
Image Uploading zaeem Classic ASP Basics 4 October 31st, 2003 03:06 AM
Uploading an Image zaeem Classic ASP Components 1 October 9th, 2003 09:41 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.