File "index.php"

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

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

	if(isset($_GET['id'])){

	$a="'";
    $b="";
    $title1 = str_replace($a, $b, strtolower($_GET['title']));

	$x=" ";
    $y="-";
    $url = str_replace($x, $y, $title1);


		$sql = "UPDATE listings SET url = '$url' WHERE id = '".$_GET['id']."'";

		//use for MySQLi OOP
		if($conn->query($sql)){
			$_SESSION['success'] = 'Succesful';
		}
		
		else{
			$_SESSION['error'] = 'Failed!';
		}
	}

	header('location: ../?creator=1&#nav_'.$_GET['id'].'');
?>