minor improvements

This commit is contained in:
/jedi/ 2018-12-27 19:51:29 +01:00
parent be8b5f50f2
commit 9962aff322
10 changed files with 217 additions and 561 deletions

View file

@ -42,6 +42,20 @@ switch($_GET["action"]) {
}
}
break;
case "tinder":
if (hasval($_POST["lost"]) && hasval($_POST["found"])) {
/* Prepared statement, stage 1: prepare */
if (!($stmt = $mysqli->prepare("INSERT INTO matches(l_id, f_id) VALUES (?, ?)"))) {
echo "Prepare failed: (" . $mysqli->errno . ") " . $mysqli->error;
}
if (!$stmt->bind_param("ii", $_POST["lost"], $_POST["found"])) {
echo "Binding parameters failed: (" . $stmt->errno . ") " . $stmt->error;
}
if (!$stmt->execute()) {
echo "Execute failed: (" . $stmt->errno . ") " . $stmt->error;
}
}
break;
}
header('Location: '.$_SERVER['HTTP_REFERER']);