Location: PHPKode > projects > JobAppr > Jobappr-1.4/admin/inc/ajax_del.php
<?php

require_once('../../includes/functions.php');
require_once('admin-functions.php');

if ($_POST['id'] != '' && $_POST['t'] == 'settings') {
	$status= mysql_query("DELETE FROM ". TB_SETTINGS ." WHERE `meta`='".$_POST['id']."'");
	if($status) {
		$success = 'The <b>'.$_POST['id'].'</b> setting has been successfully deleted';
		echo $success;
	} else {
		$error = mysql_error();
		echo $error;
	}
}


if ($_POST['id'] != '' && $_POST['t'] == 'users') {
	$status= mysql_query("DELETE FROM ". TB_USERS ." WHERE `username`='".$_POST['id']."'");
	if($status) {
		$success = '<b>'.$_POST['id'].'</b> user successfully deleted';
		echo $success;
	} else {
		$error = mysql_error();
		echo $error;
	}
}


if ($_POST['id'] != '' && $_POST['t'] == 'job') {
	$status= mysql_query("DELETE FROM ". TB_JOBS ." WHERE `job_id`='".$_POST['id']."'");
	if($status) {
		$success = 'Job #<b>'.$_POST['id'].'</b> successfully deleted';
		echo $success;
	} else {
		$error = mysql_error();
		echo $error;
	}
}
Return current item: JobAppr