Pages(menu)

To Resize Your Original Image While Uploading

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&nbsp;&nbsp;&nbsp;&nbsp;</label>
<input type="text" name="name"  value="" 
required></p>
<p style="margin-left:20%;">
<label>Photo&nbsp;&nbsp;&nbsp;&nbsp;</label>
<input type="file" value="" name="photo"  required>
&nbsp;&nbsp;</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

Rating Using JS

Source Code


!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Rate</title>
<style type="text/css">  
    .main{width:50%; height:250px; border:1px solid #633; 
margin-left:200px; margin-top:100px;}
    #rateMe{ width:50%; margin:0 auto; margin-top:100px;}
     #rateMe li a:hover,
    #rateMe .on{background:url(star-on.png) no-repeat;}
    #rateMe a{float:left;background:url(start-off.png)
no-repeat;width:50px; height:50px;}
    #rateStatus{width:200px; height:50px; color:#903;}
    #ratingSaved{display:none;}
    .saved{color:red; }
</style> 
<script type="text/javascript" language="javascript"
 src="rating.js"></script> 
</head>
<body>   
    <div class="main">    
    <div id="rateMe" title="Rate Me...">
    <a onclick="rateIt(this)" id="_1" title="Very Poor" 
onmouseover="rating(this)" onmouseout="off(this)"></a>
    <a onclick="rateIt(this)" id="_2" title="Poor " 
onmouseover="rating(this)" onmouseout="off(this)"></a>
    <a onclick="rateIt(this)" id="_3" title="Good"
 onmouseover="rating(this)" onmouseout="off(this)"></a>
    <a onclick="rateIt(this)" id="_4" title="Very Good"
 onmouseover="rating(this)" onmouseout="off(this)"></a>
    <a onclick="rateIt(this)" id="_5" title="Excellent"
 onmouseover="rating(this)" onmouseout="off(this)"></a></div>
         <p> <textarea  id="rateStatus" name="rate"></textarea></p>
    <span id="ratingSaved"></span>  
   </div>
</body>
</html>