PHP Classes

File: admin/menu-delete.php

Recommend this page to a friend!
  Classes of Abed Nego Ragil Putra  >  Giga CMS  >  admin/menu-delete.php  >  Download  
File: admin/menu-delete.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Giga CMS
Multi-user content management system
Author: By
Last change:
Date: 5 years ago
Size: 1,201 bytes


Class file image Download
include "../inc/init.php";

$user->isAdmin()) {
header("Location: $set->url/login.php");

$page->title = "Delete Menu";
$page->keyword = "";


// connect to the database
$servername = "$set->db_host";
$username = "$set->db_user";
$password = "$set->db_pass";
$dbname = "$set->db_name";

// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);

// Check connection
if ($conn->connect_error) {
"Connection failed: " . $conn->connect_error);
// check if the 'id' variable is set in URL, and check that it is valid
if (isset($_GET['id']) && is_numeric($_GET['id']))
// get id value
$id = $_GET['id'];
// delete the entry
$insert = "DELETE FROM `".MLS_PREFIX."mainmenu` WHERE id=$id";
$result = mysqli_query($conn,$insert)
 or die(

//redirect back to the view page
// if id isn't set, or isn't valid, redirect back to view page

For more information send a message to info at phpclasses dot org.