# Uploading Files With PHP

**URL:** https://forum.kirupa.com/t/uploading-files-with-php/63926
**Category:** programming
**Created:** [September 11, 2004, 12:21pm UTC](https://forum.kirupa.com/t/uploading-files-with-php/63926 "2004-09-11T12:21:53Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![dreamerp](https://avatars.discourse-cdn.com/v4/letter/d/fbc32d/32.png) [@dreamerp](https://forum.kirupa.com/u/dreamerp)
#### Post date: [September 11, 2004, 12:21pm UTC](https://forum.kirupa.com/t/uploading-files-with-php/63926/1 "2004-09-11T12:21:53Z")

</div>

Hello,

```
 Is it possible to have a PHP form that people can upload files such as images to a MySQL database, or does it have to be uploaded to just a folder. If anyone had a tutorial, or could explain anything about this please reply :-)

```

Thanks,

Peter

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [September 11, 2004, 1:08pm UTC](https://forum.kirupa.com/t/uploading-files-with-php/63926/2 "2004-09-11T13:08:05Z")

</div>

Once you’ve got the basic file uploading you can try this tute to add images into a mysql database:

[http://www.spoono.com/php/tutorials/tutorial.php?id=42](http://www.spoono.com/php/tutorials/tutorial.php?id=42)

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [September 11, 2004, 2:18pm UTC](https://forum.kirupa.com/t/uploading-files-with-php/63926/3 "2004-09-11T14:18:20Z")

</div>

One way to do it is to upload them to a folder and put the filenames in a database. When your calling for the image you and put the image tag and the path to the upload folder then query the database for the filename your looking for that you put at the end of the filepath.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [September 11, 2004, 6:51pm UTC](https://forum.kirupa.com/t/uploading-files-with-php/63926/4 "2004-09-11T18:51:35Z")

</div>

hit up this thread for a good start.

[http://www.kirupaforum.com/forums/showthread.php?t=54186&highlight=Upload+PHP+Mysql](http://www.kirupaforum.com/forums/showthread.php?t=54186&highlight=Upload+PHP+Mysql)
