Jump to content

file upload in php


Recommended Posts

Dear user
I write a file upload code in php, the code work's fine but it will upload the file up to 60 KB, when i try to upload more then 60 KB file then the page stuck on loading.
The problem is why it is not uploading more then 60kb file? is there any fault in my code please check it out..

My form.php code is...



<!doctype html>
<html lang="en">
   <meta charset="UTF-8">
   <link rel="stylesheet" href="css/bootstrap.css"/>
  <link rel="stylesheet" href="css/bootstrap.min.css"/>
<div class="col-md-6">
<form action="upload.php" method="post" enctype="multipart/form-data">
   <label for="">Item</label><br/>
  <input type="file" name="picture" class="form-control"><br/>
   <label for="">Description</label><br/>
   <textarea name="description" id="" placeholder="Enter Item Description" class="form-control"  cols="50" rows="20"></textarea><br/>

    <input type="submit" name="submit" value="Upload" class="btn btn-success">
<script src="js/bootstrap.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery-2.1.1.min.js"></script>

my upload.php code is

include 'conn.php';
    $smt=$conn->prepare("INSERT INTO images(Image_Name,Description,Placed_On)VALUES('".$image_name."','".$desc."','".$placed."')");
    echo 'error on uploading file';



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.

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.