i wanna to upload some images for my banners but i want to send special formats to my db like jpeg and png i wrote some things like this
<?
%name=$_FILES['imgfiled']['name'];
$size=$_FILES['imgfield']['size'];
$type=$_FILES['imgfield']['type'];
if ($type==image/jpeg)
//i wanna upload png files too. but i dont know how to add it. exactly i wanna send jpeg or png and not other formats.
//now i can upload only jpeg photos
{
//insert command
$sql=mysql_query("insert....);
//....
}
else
{
header("location:example.php");
//or some thing else
}
?>
may some body help me with this problem
please send me correct command