Mini Shell
<?php include 'connection.php'; ?>
<?php
$postby=$_REQUEST['postby'];
$name=$_REQUEST['name'];
$details=$_REQUEST['details'];
$date=date("Y/m/d");
$image=$_FILES["x"]["name"];
if($image)
{
$temp=$_FILES["x"]["tmp_name"];
move_uploaded_file("$temp","work_pic/$image");
$reg=mysql_query("insert into work values('','$name','$details','$date','$image','$postby') ");
}
else
{
$reg=mysql_query("insert into work values('','$name','$details','$date','','$postby') ");
}
if($reg==1)
{
?>
<?php
$produc1=mysql_query("select * from work order by id desc");
if($produc1fetch=mysql_fetch_row($produc1))
{
$wid=$produc1fetch[0];
}
?>
<script type="text/javascript">
var cn=<?php echo $wid ?>;
// window.location.href="work_pic_view.php?pp1="+ cn;
window.location.href="work_add.php";
</script>
<?php
}
else
{
?>
<script type="text/javascript">
alert("Not complete");
window.location.href="work_add.php";
</script>
<?php
}
?>
Zerion Mini Shell 1.0