📁 File Manager
Editing:
/home/wvl7mof7402e/public_html/domain/clients/edit.php.php
<?php include '../db.php'; $id = $_GET['id']; $stmt = $conn->prepare("SELECT * FROM clients WHERE id=?"); $stmt->execute([$id]); $client = $stmt->fetch(); if ($_SERVER['REQUEST_METHOD'] === 'POST') { $stmt = $conn->prepare("UPDATE clients SET name=?, company_name=?, email=?, phone=?, address=? WHERE id=?"); $stmt->execute([$_POST['name'], $_POST['company_name'], $_POST['email'], $_POST['phone'], $_POST['address'], $id]); header("Location: index.php"); } ?> <h2>Edit Client</h2> <form method="post"> <input name="name" value="<?= $client['name'] ?>" required><br> <input name="company_name" value="<?= $client['company_name'] ?>"><br> <input name="email" value="<?= $client['email'] ?>"><br> <input name="phone" value="<?= $client['phone'] ?>"><br> <textarea name="address"><?= $client['address'] ?></textarea><br> <button type="submit">Update</button> </form>
Save
Cancel