Web Design and Development Forums

PHP+SQL+File Upload

This is a discussion on "PHP+SQL+File Upload" within the PHP Forum section. This forum, and the thread "PHP+SQL+File Upload are both part of the Program Your Website category.

Old May 9th, 2008, 17:25   #1 (permalink)
Junior Member
 
Join Date: Jul 2005
Location: Lethbridge, Alberta
Posts: 17
PHP+SQL+File Upload

I have a job lined up requiring something new for me. The client wants to have the ability to put daily videos up on his website. All these videos will be converted to flash before putting them on the website. He tells me each video will be approimately 10-15min. I've been doing some searching, but so far haven't really found what I'm looking for.

I do know that I can purchase a "PHP UPLOAD2" from DMXZone program that can do this, but I was thinking this should be something I can do myself.

So here's what I'm trying to do.

1) Create a page to upload the file. This will include an HTML based page with a name field and also the file upload, and then submit it.
2) Then a PHP page will dump the file into a 'video' folder, and place the name and location into an SQL database.
3) Over on the display page I have a different problem.
3a) I will place an imageholder on the spot where the flashvideo will play
3b) Under this video spot, will be an entire list of the videos given by name (the name field from the upload). This would be done by a pull from the SQL database
3c) Upon clicking one of this links, it will play that video in the video holder spot.

This upload section will be in a sql-based "user authentication" part of the website. So there is some security there, and I will make it so it only uploads flash files.

Some direction would be most helpful. Perhaps pointing to some tutorials that you think best fit this scenario. I've been finding tutorials on 'picture uploads' similar to what I'm going for, though I know I'd have to increase the size limitations that they have placed in those. Just trying to get some further insight on this.

Thanks!
joshlindem is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old May 10th, 2008, 00:57   #2 (permalink)
Nerdy Moderator
 
CloudedVision's Avatar
 
Join Date: Feb 2008
Location: In My Own Little World
Age: 14
Posts: 520
Blog Entries: 4
Re: PHP+SQL+File Upload

How much PHP and SQL do you know? I can't really give you a poke in the right direction until I know how much you can do already.

But 10-15 minute videos could be quite large, be sure to double check how big they are and your hosts max POST size and the max upload filesize are greater than this.
__________________
Take it easy

Other Road Design

WebForumz Moderator: HTML | Javascript | PHP
CloudedVision is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old May 10th, 2008, 15:36   #3 (permalink)
Junior Member
 
Join Date: Jul 2005
Location: Lethbridge, Alberta
Posts: 17
Re: PHP+SQL+File Upload

Well... I'm not an expert, let's start there. I'm probably a novice that can look at a block of code and figure it out. In the past I would input information into the database, and then pull that info into a PHP page using PHP/SQL. Or I will get code that will do what I want and try to figure out how it's doing it.

Recently I've been going through some basic tutorials on how to upload a file and have the file name and file location stored in a database, and the file actually stored in a folder. (Found an article at About.com but I keep getting errors when I run it and it doesn't work)

As for the video, this does worry me a little. I mean I could just have him FTP the videos, but than I would probably have some issues when I attempted to pull the information out for the display page. I am going to use Easy Web Video which will convert all videos into a smaller size and in flash. Hoping that alone may help make a difference.

And then for the display page which I envision to chart out all the videos in the database, and have a 'video area' that will display the video the user clicks on in the chart.

Hope that helps you understand where I'm at a little more.
Thanks!
joshlindem is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old May 10th, 2008, 16:07   #4 (permalink)
Nerdy Moderator
 
CloudedVision's Avatar
 
Join Date: Feb 2008
Location: In My Own Little World
Age: 14
Posts: 520
Blog Entries: 4
Re: PHP+SQL+File Upload

so it sounds like you can do everything there. although using a regular upload would take 5-10 minutes, so a progress bar might be nice. (You can do this with PHP 5.2 and greater, anything less you'll have to use a perl hack.)
__________________
Take it easy

Other Road Design

WebForumz Moderator: HTML | Javascript | PHP
CloudedVision is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old May 10th, 2008, 16:44   #5 (permalink)
Junior Member
 
Join Date: Jul 2005
Location: Lethbridge, Alberta
Posts: 17
Re: PHP+SQL+File Upload

thanks for that!!

I was able to figure out that I am running PHP 5.2.2 so it looks like that will work, and will be a very handy tool.

Quick question.... for the page where I will display all this. As mentioned, I want to have a "video area" at the top of the page, like an imageplaceholder. Then underneath that I will have a table which will auto-populate the titles of the videos from the database.
Each link will than link to the video corresponding to the title (info gained from the database). When you click on the link it will than play that video in the video section.

how do I do this?
Cause I'm lost on how to get it all to link together, list all the videos and have it so they link and play the video on the top.
joshlindem is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old May 10th, 2008, 16:48   #6 (permalink)
Nerdy Moderator
 
CloudedVision's Avatar
 
Join Date: Feb 2008
Location: In My Own Little World
Age: 14
Posts: 520
Blog Entries: 4
Re: PHP+SQL+File Upload

Easy:
  1. Get the videos from the database
  2. Loop through the results using mysql_fetch_array()
  3. Each loop create a link to myvideoplayer.php?video=currentvideo
  4. In myvideoplayer.php send the value of $_GET['video'] to the flash video player
  5. have the flash video player play that video (not sure how to do that, you'll have to ask in the Flash Forum for that)
__________________
Take it easy

Other Road Design

WebForumz Moderator: HTML | Javascript | PHP
CloudedVision is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Thread Tools
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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
file upload berry05 Job Opportunities 0 Mar 19th, 2008 19:09
renama file name before upload mcnika PHP Forum 1 Mar 17th, 2008 12:13
File Upload magiccupcake PHP Forum 1 Jan 22nd, 2007 05:10
File upload djme PHP Forum 4 Jan 11th, 2006 18:25
problems with upload file. djanim8 ASP Forum 5 Dec 13th, 2005 17:33



Latest Updates

All Points SEO Security Advisory - CHECK YOUR SITE NOW!

Creative Coding :: February 2008

Webforumz is sponsored by: WESH UK Web Hosting
All times are GMT. The time now is 19:16.

Sleep Study Scoring :: Free Bet :: Website Templates :: Online Betting :: Bookmakers :: Funny Quotes :: Internet Recruitment Software :: Microsoft CRM Experts :: Online Casino :: Decorated Christmas Trees :: Midwife Forums :: Football Betting :: Ecommerce Software :: Web Hosting :: Football Stats :: Dry Cleaning Collection :: xtreme wales - extreme clothing :: Apuestas :: Sharepoint Consultants :: Website Optimisation :: Office Clearance London :: Sharepoint Experts :: Sports Betting :: Casino :: Website Templates :: Web Design Development India :: Online Gambling

Powered by: vBulletin Version 3.7, Copyright ©2000 - 2008, Jelsoft Enterprises Limited.
© 2003-2008 Webforumz.com : All Rights Reserved
Search Engine Friendly URLs by vBSEO 3.2.0 RC6


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59