Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

PHP/MySQL image upload

Explorer ,
Feb 23, 2007 Feb 23, 2007

Copy link to clipboard

Copied

I am looking for an easy to understand PHP tutorial on uploading an image to a folder. However I would like to put a reference/path to the image in a MySQL batabase table.
TOPICS
Server side applications

Views

273
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 24, 2007 Feb 24, 2007

Copy link to clipboard

Copied

LATEST
newhorizonhosting.com wrote:
> I am looking for an easy to understand PHP tutorial on uploading an image to a folder. However I would like to put a reference/path to the image in a MySQL batabase table.

The PHP online manual is pretty comprehensive on file uploads.

http://www.php.net/manual/en/features.file-upload.php

You can get the name of the file from $_FILES['fieldName']['name']
(where 'fieldName' is the name of the form field that uploads the
image). It's just a question of using that information to insert into a
database.

I cover image file uploads in considerable detail in "PHP Solutions" if
you're interested in a more comprehensive approach.

--
David Powers, Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines