File "index.php"

Full Path: /home/custbahd/tourismfraternity.com/admin/listings/add/1/index.php
File size: 495 bytes
MIME-type: text/x-php
Charset: utf-8

<?php
	session_start();
	include_once('../../../db/saucerer.php');

	if(isset($_GET['url'])){
		$id = $_GET['id'];
		$sub_type = $_GET['sub_type'];

		$sql = "UPDATE listings SET sub_type = '$sub_type' WHERE id = '$id'";

		//use for MySQLi OOP
		if($conn->query($sql)){
			$_SESSION['success'] = 'Listing assigned as '.$sub_type.' successfully';
		}
		
		else{
			$_SESSION['error'] = 'Something went wrong while assigning listing!';
		}
	}

	header('location: ../../');
?>