File "index.php"

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

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

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

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

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

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