merhaba ben bir php script buldum. ama herşey ok birtek resim ekleme olayını yapmıyor.
resim eklerken gereken kodlar aşağıda. sanırım bu database a yazmaya çalışıyo. ama mantıklı olan bi klasöre upload etmesi.
bunu nasıl düzeltiriz?
tşkler
<?
include ("islogin.php");
include ("../include/connection.php");
include ("../include/dbClass.php");
if (isset($_POST['action'] ) && $_POST['action'] ="add" && ( !empty($Image) && !empty($Image1) ) ){
$db = new database();
if ( isset( $_POST['ID'] ) && $_POST['ID'] !="" ){
$ID = $_POST['ID'] ;
$fp=@fopen("$Image","r");
$buyukResim=@addslashes(fread($fp,filesize($Image) ));
$fp=@fopen("$Image1","r");
$KucukResim=@addslashes(fread($fp,filesize($Image1 )));
$addResim = $db->addImage( $ID ,$buyukResim , $KucukResim );
if ($addResim){
$mesaj = "Resminiz Eklendi";
}
}
}// If Sonu
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-9" />
<title>GANİMET YÖNETİM</title>
<link href="../css/ganimet_style.css" rel="stylesheet" type="text/css" />
</head>
<body class="arkaplan">
<table width="553" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<form action="" method="post" enctype="multipart/form-data" name="form1" id="form1">
<fieldset style="border:3px">
<legend class="text"><strong>Resim Ekle </strong></legend>
<table width="547" height="112" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="24" class="text"> </td>
<td><? echo $mesaj ?></td>
</tr>
<tr>
<td width="106" height="24" class="text">Büyük Resim : </td>
<td width="346"><input name="Image" type="file" class="form" id="file1" /></td>
</tr>
<tr>
<td height="24" class="text">Küçük Resim : </td>
<td><input name="Image1" type="file" class="form" id="pictures1" /></td>
</tr>
<tr>
<td height="40" colspan="2" class="text"><div align="center">
<input name="ID" type="hidden" id="ID" value="<? echo $_GET['ID'] ?>" />
<input name="action" type="hidden" id="action" value="add" />
<input name="Submit" type="submit" class="text" value=" Resmi Ekle " />
</div></td>
</tr>
</table>
</fieldset>
</form></td>
</tr>
</table>
</body>
</html>
script resim eklemiyo:( acil yardım
1
●799