Saturday, April 16, 2016

Uploading Image File With PHP (Creating HTML Interface) : Part-01

header.php
<!doctype html>
<html>
<head>
<title>Uploading Image File with PHP</title>
<style>
 body{font-family: verdana}
 .phpcoding{width: 900px;margin: 0 auto; background: #ddd;}
 .headeroption, .footeroption{background: #444;color: #fff;
  text-align: center;padding: 20px;}
 .headeroption h2, .footeroption h2{margin: 0}
 .mainoption{min-height: 420px;padding: 20px}
 .myform{width: 500px;border: 1px solid  #999;margin: 0 auto; 
  padding: 10px 20px 20px;}
 input[type="submit"],input[type="file"]{cursor: pointer}
</style>
</head>
<body>
<div class="phpcoding">
 <section class="headeroption">
  <h2>Uploading Image File with PHP</h2>
 </section>

 <section class="mainoption">
index.php
<?php include 'inc/header.php';?>
 <div class="myform">
  <form action="" method="post" enctype="multipart/form-data">
   <table>
    <tr>
     <td>Select Image</td>
     <td><input type="file" name="image"/></td>
    </tr>
    <tr>
     <td></td>
     <td><input type="submit" name="submit" value="Upload"/></td>
    </tr>
   </table>
  </form>
 </div>
<?php include 'inc/footer.php';?>
footer.php
</section>
<section class="footeroption">
 <h2>www.trainingwithliveproject.com</h2>
</section>
</div>
</body>
</html>

How to practice tutorials…

  • Make a team with your friends (Member should be 4/5).
  • Start to practice one tutorial series along with them.
  • Don’t try to collect source code. Type the code while watching the tutorial.
  • If you face any problem, discuss with team members to solve quickly.