InfinityBooster Posted November 2, 2023 Share Posted November 2, 2023 <?php $title = "Update Confirmation"; include('includes/header.inc'); include('includes/nav.inc'); require_once('includes/config.inc'); require_once('includes/DbController.inc'); echo "<div id='message'>"; $error = false; if (!empty($_POST['id'])) { $db = new DbController(HOST,USER,PASS,DB); foreach ($_POST as $key => $val) { $$key = trim($val); } $sql = "UPDATE places SET location=?, theme=?, description=?, WHERE placeid=?"; $update = $db->updateRecord($sql, $location, $theme, $description, $id); if ($update) { echo "<p>Record $placename updated</p>"; } else { $error = true; } } else { $error = true; } if ($error) { echo "<p>Record is NOT updated.</p>"; } echo "</div>"; include('includes/footer.inc'); ?> Quote Link to comment Share on other sites More sharing options...
Solution requinix Posted November 2, 2023 Solution Share Posted November 2, 2023 How do I ask a good question? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.