Jump to content

images (again)but im banging my head against a wall


holz_bee

Recommended Posts

 

i have spent all day tryin go to get this to work and some one may be able to help.

 

i making a dynamic website and i want the customer to register and beable to upload an image like an avatar (also for stock photo)

 

i have made a simple form where a user enters information such as name etc and browse for a photo. I then insert the information into myPHPmyadmin database. I have no idea what to do with the photo!

 

i have read lots of tutorials and i am confused about where the image is stored and how to recall it.

 

im using phpmyadmin 2.9.2 fillzilla

 

 

thank you  ???

 

i know you have to store the path well i just dont have a clue :(

You would store the image in a directory on your server..

 

e.g.  /mysite/images/ 

 

In the database you would store the path to that file. If you upload a file to the server called 123.jpg, then the database entry would be something like

 

/mysite/images/123.jpg

 

Or you could set a global variable to your images dir like so

 

$images='./mysite/images';

 

and then just store the file name in the database.

 

123.jpg

 

Hope that helps

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.