session_start();
$mode = $_GET['mode'];
if($mode == "")
{
show();
}
if($mode == "insert")
{
insertphoto();
}
function show()
{
?>
}
$target_path_pics= "fotoimg/";
$basenameimage = time().basename($_FILES['prodimg']['name']);
$target_path_pics = $target_path_pics.$basenameimage;
if(move_uploaded_file($_FILES['prodimg']['tmp_name'],$target_path_pics))
{
$target_path_pics ;
$result=mysql_query("insert into mycart where image='".$basenameimage."'");
header("Location:viewcart.php");
}
?>