From 9fb40c9bc89f625078a9ebbb92b311f21ebfcc54 Mon Sep 17 00:00:00 2001 From: Suvodip Date: Sat, 25 May 2024 16:51:13 +0530 Subject: [PATCH] c --- .hta_slug/admin/add-user copy.php | 273 ------------------------- .hta_slug/admin/business-verticals.php | 2 - 2 files changed, 275 deletions(-) delete mode 100644 .hta_slug/admin/add-user copy.php diff --git a/.hta_slug/admin/add-user copy.php b/.hta_slug/admin/add-user copy.php deleted file mode 100644 index 0bfb377..0000000 --- a/.hta_slug/admin/add-user copy.php +++ /dev/null @@ -1,273 +0,0 @@ - setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); - } catch(PDOException $e) { - echo "Connection failed: " . $e->getMessage(); - } - - if ($_SERVER["REQUEST_METHOD"] == "POST") { - $select_access = ['beanstalk', 'inhouse', 'teenybeans', 'iimtt', 'buzzapp', 'atheneum', 'teenybeans_curriculum']; - $access_values_array = []; - - foreach ($select_access as $access) { - if (isset($_POST[$access])) { - $access_values_array[] = $_POST[$access]; - } - } - $access_value = implode(',', $access_values_array); - $name = $_POST['name']; - $email = $_POST['email']; - $phone = $_POST['phone']; - $password = md5($_POST['pass']); - $selected_states = implode(',', $_POST['states']); // Collect selected state values - - try { - $stmt = $conn->prepare("INSERT INTO users (name, email, mobile, access, pass, states) VALUES (:name, :email, :mobile, :access, :pass, :states)"); - $stmt->bindParam(':name', $name); - $stmt->bindParam(':email', $email); - $stmt->bindParam(':mobile', $phone); - $stmt->bindParam(':access', $access_value); - $stmt->bindParam(':pass', $password); - $stmt->bindParam(':states', $selected_states); // Bind selected states - $stmt->execute(); - - echo "Record added successfully"; - } catch(PDOException $e) { - echo "Error: " . $e->getMessage(); - } - } - ?> - -
-
-

Add new user

-
- - -
-
- - -
-
- - -
-
- - - -
- -
-

Access:

- prepare("SELECT * FROM business_verticals"); - $stmt->execute(); - $rows = $stmt->fetchAll(PDO::FETCH_ASSOC); - $num_rows = $stmt->rowCount(); - if ($num_rows >= 1) { - foreach($rows as $row){ ?> -
- - -
- Not Found any Data

"; - } - } catch (PDOException $e) { - echo "

Error: " . $e->getMessage() . "

"; - } - ?> -
- -
- - -
-
- -
-
-
- - \ No newline at end of file diff --git a/.hta_slug/admin/business-verticals.php b/.hta_slug/admin/business-verticals.php index 184df50..2a6d378 100644 --- a/.hta_slug/admin/business-verticals.php +++ b/.hta_slug/admin/business-verticals.php @@ -40,7 +40,6 @@ Serial Business Verticals - Time Action @@ -58,7 +57,6 @@ -
Edit   |