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
|
<?php require("configure.php"); $VideoPageId = $_POST["VideoPageId"]; $VideoPageTitleen = htmlspecialchars($_POST["VideoPageTitleen"],ENT_QUOTES); $VideoPageTitletc = htmlspecialchars($_POST["VideoPageTitletc"],ENT_QUOTES); $VideoPageTitlesc = htmlspecialchars($_POST["VideoPageTitlesc"],ENT_QUOTES); $VideoPageLink = htmlspecialchars($_POST["VideoPageLink"],ENT_QUOTES); $VideoPageDate = $_POST["VideoPageDate"];
//print_r($_POST);
preg_match( '/[\\?\\&]v=([^\\?\\&]+)/', $VideoPageLink, $matches ); //var_dump($matches); if (isset($matches[1])) { $VideoPageLink = 'http://www.youtube.com/v/'.$matches[1].'&rel=1'; } else { $VideoPageLink = $VideoPageLink; }
// Modify $sql = "update VideoPage set VideoPageTitleen='$VideoPageTitleen', VideoPageTitletc='$VideoPageTitletc', VideoPageTitlesc='$VideoPageTitlesc', VideoPageLink='$VideoPageLink', VideoPageDate='$VideoPageDate' "; $sql .= " where VideoPageId=". $VideoPageId ." "; mysql_query($sql);
if( mysql_errno() > 0 ){ echo 'VideoPage Modify Error:<br />'. mysql_error() .'<br />SQL: '. $sql; exit; } mysql_close($dbh);
header("Location: videopage_index.php?msg=Modify Successful"); ?>
|