Cytat(spokoloko123 @ 5.08.2012, 11:00:37 )

usunąłeś nie usunołeś, a ten "typ" to rozszerzenie. Czego oczekujesz? Że wiemy skąd się wzięła zmienna $productName?
$productName wziął się z formularza , cały kod:
$productName=isset($_POST['productname']) ?
$_POST["productname"] : ""; $cena=isset($_POST['cena']) ?
$_POST["cena"] : ""; $opis=isset($_POST['opis']) ?
$_POST["opis"] : ""; $producent=isset($_POST['producent']) ?
$_POST["producent"] : ""; $numer_katalogowy=isset($_POST['numer_katalogowy']) ?
$_POST["numer_katalogowy"] : "";
}
if(empty($productName)) { echo 'brak wsystkich danych. <a href="inventry_list.php">powrót</a>';
}
else {
include "../storesript/conecttomysql.php";
$sql= mysql_query("SELECT id FROM products WHERE productname='$productName' LIMIT 1"); if ($productMatch >0) {
echo "Podwójne ID <a href='inventry_list.php'>powrót</a>"; exit;}
$sql=mysql_query("INSERT INTO products (productname,cena,opis,producent,numer_katalogowy) VALUES( '$productName', '$cena', '$opis', '$producent', '$numer_katalogowy')") or
die(mysql_error()); if($sql) {
echo "zostało dodane <a href='inventry_list.php'>powrót</a>";
} else {
echo "produkt nie został dodany <a href='inventry_list.php'>powrót</a>"; }
$fileSize = $_FILES["fileField"]["size"];
$fileType = $_FILES["fileField"]["type"];
$fileTmpLoc = $_FILES["fileField"]["tmp_name"];
$kaboom = explode(".", $productName); if($fileSize > 5242880) { // if file size is larger than 5 Megabytes
echo "ERROR: Your file was larger than 5 Megabytes in size."; // Remove the uploaded file from the PHP temp folder /*else if (!preg_match("/.(gif|jpg|png|jpeg)$/i", $productName) ) {
// This condition is only if you wish to allow uploading of specific file types
echo "ERROR: Your image was not .gif, .jpg, or .png.";
unlink($fileTmpLoc); // Remove the uploaded file from the PHP temp folder
exit();
}*/
// Check to make sure the move result is true before continuing
if ($moveResult != true) {
echo "ERROR: File not uploaded. Try again."; // Remove the uploaded file from the PHP temp folder
}
}