Jump to content

image upload file size limit


princeofpersia

Recommended Posts

Hi guys, with code below i can upload pictures to database, however i need to limit the file upload. I have this code done with help of php freak forum and i am  a newbie so can u help me please? thanks in advance

 

		
if (isset($_POST['register']) && $_POST['register']){
//image1
	$nameone=$_FILES['myfileone']['name'];
	if ($nameone)

	{
		$dst_filename = resize_upload_image($_FILES['myfileone'], "images/");
		if ($dst_filename !== false) {
			extract($dst_filename);
			$image1 = mysql_query ("INSERT INTO img SET image='$img_filename', thumb='$thumb_filename', refimage='$reference'");
		}
	}
}
?>
<form action='' method='POST' enctype='multipart/form-data'>
<p>File:
      <input type='file' name='myfileone'>

Link to comment
https://forums.phpfreaks.com/topic/223411-image-upload-file-size-limit/
Share on other sites

PHPF is about people Helping people LEARN, part of learning is to know how and where to find solutions. The first item in the link supplied answers your question, Perhaps one should be grateful for someone taking their time to find the answers for you

thanks i know how to google, i though php freak is about php not google tutorials !!! anyways if i could what im looking in google i wouldnt have posted it here >:(

 

the answer to your question is in the first result of that search. do you expect us to copy the code and post it here for you?

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.