Jump to content

wompas.dub

Members
  • Posts

    10
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

wompas.dub's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. nice discomatt, that was exactly what I needed. Strangely enough I have never needed to do anything like that before PM me if you ever need anything
  2. I was doing something similar it kept giving me long repeated of the same number in no order at all. I'll try that out, thanks a lot
  3. yeah, I agree with these guys - I'd say what could really get what you want done exactly would have to be a Java applet or something. :\ sorry man
  4. Hey everyone, I'm trying to figure out the most popular entries in a database. For example, if there are a ton of entries with the ID 2 I want it to figure out first how many entries have been made with that ID and then rank it by how many entries have that particular ID and then rank in order from greatest to least. I'm trying to figure out the queries I'd have to use but I'm not sure if there is some query I don't know about or if I'm going to have to do a series of queries and then process it with PHP. If anyone can point me in the right direction I'd appreciate it
  5. Can someone tell me why it takes 3-5 minutes for a video upload? What can I do to speed this up, is there any way possible? filesize is around 5 megs
  6. Update: I figured out what you have to put for uploading .mov files: video/quicktime video/mpeg for mpegs All I did to make mine work is bypass the conditional statement that tells it to display errors if its of the wrong extension. What I got at the end of everything being displayed was: Name: 22n.mov Size: 4122342 Type: video/quicktime File Uploaded:.... I got the type of it and put video/quicktime instead of video/mpeg as I didn't know what exactly to put. Anyway, it works and your script was definetly a great help to get mine running. Is there anything I can do to speed the upload speed though? On average its taking 3 minutes. Thanks for the help it was greatly appreciated.
  7. Nice, Thanks man. I will try using video/mpeg and try uploading a .mov if not I guess it will only upload mpeg :p haha
  8. Well I already wrote the image upload, I just need to make a way to upload video files instead of image files. I've honestly never attempted this before, Specifically the section that says : [code] if ($_FILES['videofile']['type'] == "video/mov"){ [/code] When I attempt to upload a .mov file it takes forever and finally tells me its an invalid file type.
  9. I'm trying to make a script to upload .mov files this is the code I have - really the only thing I can't figure out is instead of image/jpeg or gif etc. what do I put exactly for video files? specifically .movs [code] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> </head> <body> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>File Upload script</title> </head> <body> <h1>Upload...</h1> <form name="form1" method="post" action="" enctype="multipart/form-data"> <input type="file" name="videofile"> <br> <input type="submit" name="Submit" value="Submit"> <? if(isset( $Submit )) { //If the Submitbutton was pressed do: $vid_name = $_FILES['videofile']['name']; mysql_select_db('sec2nun', $db); $sql = "INSERT INTO `site_tbl` ( `u_ID` , `page_title` , `page_img` , `page_vid` , `page_content` , `featured_id` ) VALUES ( NULL , '', '', 'vid_name', '', '0' ) "; if ($_FILES['videofile']['type'] == "video/mov"){ copy ($_FILES['videofile']['tmp_name'], "uploads/".$_FILES['videofile']['name'])     or die ("Could not copy"); $result = mysql_query($sql, $db); if(!$result){ echo "failed to insert image information into mySQL database, reason: "; echo mysql_error(); die(); } else{ echo "image information successfully added to mySQL database...<br/> ";     } echo "";         echo "<br/>"; echo "Name: ".$_FILES['videofile']['name']."";         echo "<br/>"; echo "Size: ".$_FILES['videofile']['size']."";         echo "<br/>"; echo "Type: ".$_FILES['videofile']['type']."";         echo "<br/>"; echo "Copy Done....<br/><br/>";         echo "image preview:<br/><EMBED SRC=\"uploads/$vid_name\" height=\"365\" width=\"345\" autostart=\"true\" loop=\"false\"></EMBED>"; }         else {             echo "<br><br>";             echo "Could Not Copy, Wrong Filetype (".$_FILES['imagefile']['name'].")<br>";         } } ?> </form> </body> </html> </body> </html> [/code] any help would be much appreciated. thanks
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.