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

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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