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
29
30
31
32
33
34
35
36
37
38
39
40
41
|
<?php require("configure.php"); $IndexVideoId = $_POST["IndexVideoId"]; $IndexVideoTitleen = htmlspecialchars($_POST["IndexVideoTitleen"],ENT_QUOTES); $IndexVideoTitletc = htmlspecialchars($_POST["IndexVideoTitletc"],ENT_QUOTES); $IndexVideoTitlesc = htmlspecialchars($_POST["IndexVideoTitlesc"],ENT_QUOTES); $IndexVideolink = htmlspecialchars($_POST["IndexVideolink"],ENT_QUOTES); //print_r($_POST);
//echo $_POST["IndexVideolink"]."<br />";
preg_match( '/[\\?\\&]v=([^\\?\\&]+)/', $IndexVideolink, $matches ); //var_dump($matches); if (isset($matches[1])) { $IndexVideolink = 'http://www.youtube.com/v/'.$matches[1].'&rel=1'; } else { $IndexVideolink = $IndexVideolink; } //exit;
// Modify $sql = "update IndexVideo set IndexVideoTitleen='$IndexVideoTitleen', IndexVideoTitletc='$IndexVideoTitletc', IndexVideoTitlesc='$IndexVideoTitlesc', IndexVideolink='$IndexVideolink' "; $sql .= " where IndexVideoId=". $IndexVideoId ." "; //echo "<br />sql= $sql";
mysql_query($sql);
if( mysql_errno() > 0 ){ echo 'Home Video Modify Error:<br />'. mysql_error() .'<br />SQL: '. $sql; exit; } mysql_close($dbh);
header("Location: indexvideo_modifyform.php?id=". $IndexVideoId ."&msg=Modify Successful"); ?>
|