feat!: allow registration of multiple users (#340)
feat: administration area feat: add reset password functionality
This commit is contained in:
@@ -2,17 +2,16 @@
|
||||
|
||||
require_once '../../includes/connect_endpoint.php';
|
||||
|
||||
session_start();
|
||||
|
||||
if (isset($_SESSION['loggedin']) && $_SESSION['loggedin'] === true) {
|
||||
$paymentMethods = $_POST['paymentMethodIds'];
|
||||
$order = 1;
|
||||
|
||||
foreach ($paymentMethods as $paymentMethodId) {
|
||||
$sql = "UPDATE payment_methods SET `order` = :order WHERE id = :paymentMethodId";
|
||||
$sql = "UPDATE payment_methods SET `order` = :order WHERE id = :paymentMethodId and user_id = :userId";
|
||||
$stmt = $db->prepare($sql);
|
||||
$stmt->bindParam(':order', $order, SQLITE3_INTEGER);
|
||||
$stmt->bindParam(':paymentMethodId', $paymentMethodId, SQLITE3_INTEGER);
|
||||
$stmt->bindParam(':userId', $userId, SQLITE3_INTEGER);
|
||||
$result = $stmt->execute();
|
||||
$order++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user