Jump to content

uploader script is timeing out


tenfoottrike

Recommended Posts

ok im making a uploader script for video the only prob is anything over a min it just stops and times out also anything under takes a long time now im still new to php im just a noob also is there a way for php to show the upload in a progress bar?

 

anyway heres the code for what i have now any help would be awesome :D

 

 <?php
if(session_start()){
	if($_FILES['file']['name'] != ""){
		copy($_FILES['file']['tmp_name'], 'images/video/' . $_FILES['file']['name']) or die("Could not copy file");
		$id;
		$item_name = $_POST['item_name'];
		$date = $_POST['date'];
		$type = $_POST['type'];
		$comments = $_POST['comments'];
		$file = $_FILES['file']['name'];

		$conn = @mysql_connect("localhost","username","password") or die("Could not connect");
		$rs = @mysql_select_db("database", $conn) or die("Could not connect to database");
		$sql = "insert into contest(id, item_name, date, type, comments, file) values ('', '$item_name', '$date', '$type', '$comments', '$file')";
		$rs = mysql_query($sql, $conn) or die("Could not execute query");
		mysql_close();
		}
	else{
			die("No file specified");
		}
	}
	else{
		header("Location:page_not_made_yet.php");
		}
?> 

 

ya it's stupid small and basic  8)

Link to comment
https://forums.phpfreaks.com/topic/191779-uploader-script-is-timeing-out/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.