<?php
session_start();
if(strpos(strtolower($_SERVER['REQUEST_URI']), 'phpsessid') !== false)
{
  session_destroy();
  session_regenerate_id();
  session_start();
                              
}
include "../phpconfig/config.php";
include "../phpconfig/valida_login.php";
include "../phpconfig/slugfy.php";

$id = $_POST['campanha'];
$c = $_POST['cidades'];



if(isset($c) and $c!=''){ 




	mysql_query("INSERT INTO anuncios (id_camp, id_cidade)VALUES ('$id','$c')", $con) or die(mysql_error());

}

header("location:edit.php?id=$id");