Source Code
<html><div class="rst"> <h2 align="center"> To Resize Your Original Image While Uploading</h2></div> <form name="rstech" action="" method="post" enctype="multipart/form-data" class="rs"> <h3 align="center">Upload Images</h3> <p><?php echo $msg;?></p> <p><label>Name </label> <input type="text" name="name" value="" required></p> <p style="margin-left:20%;"> <label>Photo </label> <input type="file" value="" name="photo" required> </p> <p style="margin-left:20%;"> <input type="submit" value="submit" name="submit" class="ser"></p> <div class="rstech"> <table width="100%" height="30%" cellpadding="10" cellspacing="5"> <tr> <th>S.No</th> <th>Categories</th> <th>Original Image</th> <th>Resize Image</th> <th>Delete</th> </tr> <?php $select=mysql_query("select * from resize order by name asc"); $i=1; while($row=mysql_fetch_array($select)) { $id=$row['id']; $name=$row['name']; $photo=$row['photo']; ?> <tr> <td><?php echo $i++; ?></td> <td><?php echo $name; ?></td> <td><a href="upload/<?php echo $photo; ?>" target="_blank"> <img src="upload/<?php echo $photo; ?>" title="click here see the original image" width="100" height="100 "></a></td> <td><a href="thumb/<?php echo $photo; ?>" target="_blank"> <img src="thumb/<?php echo $photo; ?>" title="click here see the resize image" > </a></td> <td><a href="index.php? del=<?php echo $id;?>">Delete</a></td> </tr> <?php } ?> </table> </div> </form></html
click here to download

No comments:
Post a Comment