aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/edit.inc.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/edit.inc.php b/test/edit.inc.php
index a08a48a..46d48b4 100644
--- a/test/edit.inc.php
+++ b/test/edit.inc.php
@@ -4,6 +4,7 @@ if($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST['action']) && $_POST["ac
try {
$conn = new PDO("mysql:host=localhost;dbname=testdb", "testuser", "testpass");
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
+
$stmt = $conn->prepare("UPDATE tbl1 SET `name`=:name, `from`=:from, `to`=:to WHERE id=:id");
$stmt->bindParam(':id', $_POST["id"]);
$stmt->bindParam(':name', $_POST["name"]);
@@ -23,6 +24,7 @@ if($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST['action']) && $_POST["ac
try {
$conn = new PDO("mysql:host=localhost;dbname=testdb", "testuser", "testpass");
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
+
$stmt = $conn->prepare("SELECT * FROM tbl1 WHERE id=:id");
$stmt->bindParam(':id', $_POST["id"]);
$stmt->execute();