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
26
27
28
|
<?php require("configure.php"); ?> <? $videoid = $_POST["videoid"]; $videotitle = $_POST["videotitle"];
if ($_FILES['image']['name'] <> '') { move_uploaded_file ($_FILES['image']['tmp_name'], "video/".$videoid.$_FILES['image']['name']) or die ("Could not copy, File Size Max.2M and change the filename to all english."); $image = $videoid.$_FILES['image']['name']; } else { $image = ""; }
$sql = "update video set videoid='$videoid', videotitle='$videotitle' "; if ($image <> '') $sql .= ", videofile='$image' "; $sql .= "where videoid=". $videoid ." ";
mysql_query($sql); mysql_close($dbh);
header("Location: videoindex.php?msg=Update Successful"); ?>
|