aboutsummaryrefslogtreecommitdiff
path: root/test/edit.inc.php
diff options
context:
space:
mode:
authorMateja <mail@matejamaric.com>2020-10-04 04:19:03 +0200
committerMateja <mail@matejamaric.com>2020-10-04 04:19:03 +0200
commit06d63e029d941a7993abbfb764237a55715c64da (patch)
tree12fb5891158894c3f94004431efcfc6fba5e66cc /test/edit.inc.php
parent9bcdc348dc9e93440e1cb5067548241259750cef (diff)
downloadold-php-yota-06d63e029d941a7993abbfb764237a55715c64da.tar.gz
old-php-yota-06d63e029d941a7993abbfb764237a55715c64da.zip
Check and debug your code now...
Diffstat (limited to 'test/edit.inc.php')
-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();