&1", $updw); $s = "/var/home/slowtwitch/slowtwitch.com/www/tick/scripts/pics.pl $filename t_ 130"; exec("$s 2>&1", $updw); $url = "/tick/images/gallery/"; $sql = "fullname = '" . $filename . "', fullurl = '" . $url . "', "; } if ($ID != 0) { $query = "UPDATE pics SET " . $sql . "caption = '" . myaddslashes($_POST['caption']) . "'," . "courtesy_of = '" . myaddslashes($_POST['courtesy_of']) . "' " . "WHERE ID = '$ID'"; $result = mysql_query($query, $db); } else { $query = "INSERT INTO pics (stageID,fullname,fullurl,caption,courtesy_of,default_flag) VALUES ('" . $_POST['stageID'] . "','" . $filename . "','" . $url . "','" . myaddslashes($_POST['caption']) . "','" . myaddslashes($_POST['courtesy_of']) . "','" . "no')"; $result = mysql_query($query, $db); } header("Location: /tick/pics.php"); ?>