function delete_concert($id) { $update = "UPDATE concerts SET deleted ='y' where id=" . $id; $result = mysql_query($update); if (!$result) { echo "'Error deleting the concert from the database: " . $update . "<br>"; } else { $concert = get_concert($id); echo "<div class=\"center\"><h1>Success!</h1>" . "<h3>The concert for <span class=\"success\">" . $concert['artist'] . " at " . $concert['venue'] . "</span> has been deleted.</h3></div>"; } }
} else { $date = $_POST['date']; $artist = $_POST['artist']; $band_pic_url = $_POST['band_pic_url']; $band_url = $_POST['band_url']; $venue = $_POST['venue']; $ticketinfo = $_POST['ticketinfo']; $ticketurl = $_POST['ticketurl']; $featured = $_POST['featured']; if (!$date || !$artist || !$venue || !$ticketinfo || !$ticketurl) { echo '<div class="top-spacer_20 center error">Error - missing required value(s)</div>'; } else { $result = update_concert($id, $date, $artist, $band_pic_url, $band_url, $venue, $ticketinfo, $ticketurl, $featured); if ($result) { echo '<div class="top-spacer_20 center"><h1>Update was successful!</h1>'; display_concert(get_concert($id)); echo "</div>"; } } } ?> <div class="top-spacer_20"> <a href="concert_view_all.php">Vie wall Concerts</a> <p> <a href="cp.php">Control Panel</a> </div> </div> </div> <!-- end of row div --> <?php } require "partials/_footer.php";