나는 직원 2 열 찍어 이름으로 텍스트 영역왜 열의 값이 항상 1입니까?
의 내용을 사진와 작은
테이블을 가지고있다.
는 지금은 값이 항상 1하지만 두 번째에있는 사진의 이름이 열 작은로, 텍스트 영역에 쓸 때. 이 코드에서 잘못된 점은 무엇입니까?
Tiny Varchar(30) NULL
마크 업 및 코드 : 열 Tiny
의
세부
<div id="main">
<h2>Posta un nuovo film o una serie</h2>
<p>
<form enctype="multipart/form-data" action="amministrazione.php" method="POST">
<textarea id="name" name="tiny" rows="15" cols="80"></textarea><br>
<label for="photo">Copertina DVD | Serie </label>
<input type="file" name="photo"><br><br>
<input type="submit" value="Crea">
<?php
//This is the directory where images will be saved
$target = "../image/";
$target = $target . basename($_FILES['photo']['name']);
//This gets all the other information from the form
$tiny = (isset($_POST['tiny']));
$pic= ($_FILES['photo']['name']);
mysql_query("INSERT INTO employees VALUES ('$tiny', '$pic')") ;
//Writes the photo to the server
if(move_uploaded_file($_FILES['photo']['tmp_name'], $target))
{
//Tells you if its all ok
echo "The file ". basename(isset($_FILES['uploadedfile']['name'])). " has been uploaded, and your information has been added to the directory";
}
else {
//Gives and error if its not
echo "Sorry, there was a problem uploading your file.";
}
?>
</form>
</p>
</div>
'최대 길이'는 무엇입니까? – Strawberry