fixed upload without image
This commit is contained in:
parent
f2aaadac79
commit
c2aed76eda
1 changed files with 1 additions and 1 deletions
2
ajax.php
2
ajax.php
|
@ -182,7 +182,7 @@ switch($_GET["action"]) {
|
||||||
}
|
}
|
||||||
$item_id = $mysqli->insert_id;
|
$item_id = $mysqli->insert_id;
|
||||||
|
|
||||||
if(isset($_FILES["image"])){
|
if(isset($_FILES["image"]) && hasval($_FILES["image"]["tmp_name"])){
|
||||||
|
|
||||||
$hash = md5($_FILES['image']['name'].time());
|
$hash = md5($_FILES['image']['name'].time());
|
||||||
if(move_uploaded_file($_FILES['image']['tmp_name'], "upload/".$hash)){
|
if(move_uploaded_file($_FILES['image']['tmp_name'], "upload/".$hash)){
|
||||||
|
|
Loading…
Reference in a new issue