&1", $updw); $url = "/tick/images/gallery/"; $sql = "thumbname = '" . $filename . "', thumburl = '" . $url . "', "; } if ($ID != 0) { $query = "UPDATE videos SET " . $sql . "link = '" . $_POST['link'] . "'," . "caption = '" . myaddslashes($_POST['caption']) . "'," . "courtesy_of = '" . myaddslashes($_POST['courtesy_of']) . "' " . "WHERE ID = '$ID'"; $result = mysql_query($query, $db); } else { $query = "INSERT INTO videos (stageID,thumbname,thumburl,link,caption,courtesy_of,default_flag) VALUES ('" . $_POST['stageID'] . "','" . $filename . "','" . $url . "','" . $_POST['link'] . "','" . myaddslashes($_POST['caption']) . "','" . myaddslashes($_POST['courtesy_of']) . "','" . "no')"; $result = mysql_query($query, $db); } $file = "$DOCUMENT_ROOT/tick/images/gallery/pic" . $_POST['stageID'] . ".txt"; header("Location: /tick/videos.php"); ?>