PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 15th, 2012, 04:13 AM
akhileshAhuja akhileshAhuja is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2012
Posts: 3 akhileshAhuja User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 45 m 34 sec
Reputation Power: 0
PHP-General - Downloading/Uploading

How Can I Upload And Download Files From Mysql Database...

I want to store my files into MYSQl Database With Different Id's And Want To Show It to user If user click it then File Will Download from MYsql.

Thanks in advance

Reply With Quote
  #2  
Old December 15th, 2012, 04:26 AM
Jacques1's Avatar
Jacques1 Jacques1 is offline
pollyanna
Click here for more information.
 
Join Date: Jul 2012
Location: Germany
Posts: 1,881 Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level) 
Time spent in forums: 1 Month 2 Weeks 2 Days 9 h 36 m 16 sec
Reputation Power: 813
Hi,

do you want to actually store the file content in the database? If so, why? Why not use the file system for that?

Reply With Quote
  #3  
Old December 15th, 2012, 04:51 AM
cssbonding's Avatar
cssbonding cssbonding is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2012
Posts: 54 cssbonding User rank is Sergeant (500 - 2000 Reputation Level)cssbonding User rank is Sergeant (500 - 2000 Reputation Level)cssbonding User rank is Sergeant (500 - 2000 Reputation Level)cssbonding User rank is Sergeant (500 - 2000 Reputation Level)cssbonding User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 10 h 47 m 10 sec
Reputation Power: 9
It's not wise to upload files into a database, not only will it bloat the database but will make it run slower if there are any queries to that database, its better to use a file system

Reply With Quote
  #4  
Old December 15th, 2012, 04:54 AM
akhileshAhuja akhileshAhuja is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2012
Posts: 3 akhileshAhuja User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 45 m 34 sec
Reputation Power: 0
I Don't Know How to Use File System.......I Am Beginner in php...

Reply With Quote
  #5  
Old December 15th, 2012, 05:05 AM
cssbonding's Avatar
cssbonding cssbonding is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2012
Posts: 54 cssbonding User rank is Sergeant (500 - 2000 Reputation Level)cssbonding User rank is Sergeant (500 - 2000 Reputation Level)cssbonding User rank is Sergeant (500 - 2000 Reputation Level)cssbonding User rank is Sergeant (500 - 2000 Reputation Level)cssbonding User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 10 h 47 m 10 sec
Reputation Power: 9
Read up regarding using $_FILES, it should be helpful

Reply With Quote
  #6  
Old December 15th, 2012, 05:11 AM
Jacques1's Avatar
Jacques1 Jacques1 is offline
pollyanna
Click here for more information.
 
Join Date: Jul 2012
Location: Germany
Posts: 1,881 Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level) 
Time spent in forums: 1 Month 2 Weeks 2 Days 9 h 36 m 16 sec
Reputation Power: 813
If you don't know something, then the solution is to learn it. Just google for "php file upload", and you'll find plenty of explanations and examples (but skip w3schools, they usually tell you bullsh*t).

The PHP manual even has a whole chapter on this topic:
http://php.net/manual/en/features.file-upload.php

Be aware that letting users upload files is always dangerous, so read up on security, too. For example, you don't want people to upload PHP scripts and play with your server.

Reply With Quote
  #7  
Old December 15th, 2012, 05:23 AM
akhileshAhuja akhileshAhuja is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2012
Posts: 3 akhileshAhuja User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 45 m 34 sec
Reputation Power: 0
Jacques1

I go through uploading File Tutorial. But I want Download File Tutorial...

Because I want to make a web site for college in that i want to put a file upload function for Faculty And Download Function For Student.......

If a faculty logged in then he/she can upload notes.. and then if a student logged in then he/she can see what all are uploads from faculty and if he/she want's it then click it and get the file.......

Reply With Quote
  #8  
Old December 17th, 2012, 12:41 AM
drumn4life0789 drumn4life0789 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2008
Posts: 129 drumn4life0789 User rank is Sergeant (500 - 2000 Reputation Level)drumn4life0789 User rank is Sergeant (500 - 2000 Reputation Level)drumn4life0789 User rank is Sergeant (500 - 2000 Reputation Level)drumn4life0789 User rank is Sergeant (500 - 2000 Reputation Level)drumn4life0789 User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 2 Days 23 h 1 m 20 sec
Reputation Power: 10
Look up scandir and opendir. These functions allow you to look through a directory and list the items inside. Just look at a few examples of that and you should be good.

The most difficult part would setting up the file system in a well organized way that way you list what you want to list to the right people.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPHP Development > PHP-General - Downloading/Uploading

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap