edit user

This commit is contained in:
Kar l5
2024-05-03 21:08:57 +05:30
parent c8ab3ad24c
commit 757e44b02d
17 changed files with 2855 additions and 19 deletions

View File

@@ -2,25 +2,7 @@
require_once('.hta_config/crm_config.php');
require_once('.htac_header.php');
require_once('.htac_nav.php');
try {
$conn = new PDO("mysql:host=$mariaServer;dbname=$mariaDb", $mariaUser, $mariaPass);
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$stmt = $conn->prepare("SELECT * FROM users WHERE `id` = '".$_GET["id"]."'");
$stmt->execute();
$rows = $stmt->fetchAll(PDO::FETCH_ASSOC);
foreach($rows as $row){
$seletedState = explode(",", $row['states']);
}
}catch (PDOException $e) {
echo "<p class='text-danger'>Error: " . $e->getMessage() . "</p>";
}
try {
$conn = new PDO("mysql:host=$mariaServer;dbname=$mariaDb", $mariaUser, $mariaPass);
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
} catch(PDOException $e) {
echo "Connection failed: " . $e->getMessage();
}
if ($_SERVER["REQUEST_METHOD"] == "POST") {
// $name = $_POST['name'];