1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
<?php require("configure.php"); ?> <? $slideshowId = $_POST["slideshowId"];
if ($_FILES['image']['name'] <> '') { move_uploaded_file ($_FILES['image']['tmp_name'], "../slideshow/".$slideshowId.".jpg") or die ("Could not copy, File Size Max.2M and change the filename to all english."); $image = $slideshowId.".jpg"; } else { $image = ""; }
$sql = "update slideshow set slideshowId='$slideshowId'"; if ($image <> '') $sql .= ", image='$image' "; $sql .= "where slideshowId=". $slideshowId ." "; //echo $sql; mysql_query($sql); mysql_close($dbh);
header("Location: mainslideshowindex.php?msg=Update Successful"); ?>
|