Uploading files to my server - Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more
Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more
Go Back   Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more > Webmaster Tech > Databases - MySQL, SQL, Oracle, Access and others

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 11-17-2010, 02:31 PM   #1 (permalink)
Junior Member
 
Join Date: Nov 2010
Posts: 4
Default Uploading files to my server

Guys,
I want to build a page on my appache server so I can upload documents and music to my server. Does anyone know how I can do that?
reen01010 is offline   Reply With Quote
Sponsored Links
Old 01-12-2011, 07:05 AM   #2 (permalink)
Junior Member
 
Join Date: Jan 2011
Posts: 18
Default Re: Uploading files to my server

It is easy but it has nothing to do with MySQL.
You can upload music, picutres and etc in MySQL, but much better solution do it just with PHP.
after_me is offline   Reply With Quote
Old 01-23-2011, 10:03 PM   #3 (permalink)
Junior Member
 
jalicia18's Avatar
 
Join Date: Nov 2010
Location: Philippines
Posts: 14
Send a message via Skype™ to jalicia18
Default Re: Uploading files to my server

in your form must have a enctype="multipart/form-data"
ie: <form enctype="multipart/form-data" name="" action="" >
<input type="FILE">
<input type="submit" value="Upload">
</form>

$fileName = $_FILES['userfile']['name'];
$tmpName = $_FILES['userfile']['tmp_name'];
$fileSize = $_FILES['userfile']['size'];
$fileType = $_FILES['userfile']['type'];

$query = "INSERT INTO upload (name, size, type, content ) ".
"VALUES ('$fileName', '$fileSize', '$fileType', '$content')";

--------------------
Displaying the image, should include this header("Content-type: image/jpeg");
then call the image name.
jalicia18 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Sponsors

» Links

» Affiliates
Web Hosting
Online Backup Reviews
Marketing Find
Merchant Select
SiteMap Builder
Host Compare

» Links

» Sports Network
Paintball Forum
Football Forum
Hockey Forum
Golf Forum
Boxing Forum
Lacrosse Forum
Baseball Forum
SnowBoarding Forum
Soccer Forum
MMA Forum


All times are GMT -4. The time now is 07:58 AM.


Powered by vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.2
Webmaster Forums
Web Hosting | Chicago Web Hosting | Web Hosting