Mini Shell
<?php include 'connection.php'; ?>
<?php
$id=$_REQUEST['id'];
$name=$_REQUEST['name'];
$rs=$_REQUEST['rs'];
$m1=$_REQUEST['m1'];
$m2=$_REQUEST['m2'];
$m3=$_REQUEST['m3'];
$date=date("Y/m/d");
$image=$_FILES["x"]["name"];
if($image)
{
$temp=$_FILES["x"]["tmp_name"];
move_uploaded_file("$temp","product_pic/$image");
$reg=mysql_query(" UPDATE product SET name='$name',price='$rs',m1='$m1',m2='$m2',m3='$m3',pic='$image' WHERE id='$id'");
}
else
{
$reg=mysql_query(" UPDATE product SET name='$name',price='$rs',m1='$m1',m2='$m2',m3='$m3' WHERE id='$id'");
}
if($reg==1)
{
?>
<script type="text/javascript">
alert("File Update");
var cn=<?php echo $id ?>;
window.location.href="product_edit.php?id="+ cn;
</script>
<?php
}
else
{
?>
<script type="text/javascript">
alert("Process Not complete");
var cn=<?php echo $id ?>;
window.location.href="product_edit.php?id="+ cn;
</script>
<?php
}
?>
Zerion Mini Shell 1.0