princeofpersia Posted January 4, 2011 Share Posted January 4, 2011 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'> Quote Link to comment Share on other sites More sharing options...
BlueSkyIS Posted January 4, 2011 Share Posted January 4, 2011 http://www.google.com/search?client=safari&rls=en&q=php+image+upload+maximum+file+size&ie=UTF-8&oe=UTF-8 Quote Link to comment Share on other sites More sharing options...
princeofpersia Posted January 5, 2011 Author Share Posted January 5, 2011 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 Quote Link to comment Share on other sites More sharing options...
litebearer Posted January 5, 2011 Share Posted January 5, 2011 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 Quote Link to comment Share on other sites More sharing options...
BlueSkyIS Posted January 5, 2011 Share Posted January 5, 2011 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? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.