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
|
<?php require("configure.php"); $GCardId = $_POST["GCardId"]; $GCardParenten = htmlspecialchars($_POST["GCardParenten"],ENT_QUOTES); $GCardStudenten = htmlspecialchars($_POST["GCardStudenten"],ENT_QUOTES); $GCardDescen = preg_replace("/'/","\'",$_POST["GCardDescen"]); $GCardParenttc = htmlspecialchars($_POST["GCardParenttc"],ENT_QUOTES); $GCardStudenttc = htmlspecialchars($_POST["GCardStudenttc"],ENT_QUOTES); $GCardDesctc = preg_replace("/'/","\'",$_POST["GCardDesctc"]); $GCardParentsc = htmlspecialchars($_POST["GCardParentsc"],ENT_QUOTES); $GCardStudentsc = htmlspecialchars($_POST["GCardStudentsc"],ENT_QUOTES); $GCardDescsc = preg_replace("/'/","\'",$_POST["GCardDescsc"]);
//print_r($_POST);
// Modify $sql = "update GCard set GCardParenten='$GCardParenten', GCardStudenten='$GCardStudenten', GCardDescen='$GCardDescen', GCardParenttc='$GCardParenttc', GCardStudenttc='$GCardStudenttc', GCardDesctc='$GCardDesctc', GCardParentsc='$GCardParentsc', GCardStudentsc='$GCardStudentsc', GCardDescsc='$GCardDescsc' "; $sql .= " where GCardId=". $GCardId ." "; mysql_query($sql);
if( mysql_errno() > 0 ){ echo 'Greeting Card Modify Error:<br />'. mysql_error() .'<br />SQL: '. $sql; exit; }
mysql_close($dbh);
header("Location: gcard_index.php?msg=Modify Successful"); ?>
|