<?php
$host= osc_db_host();
$username= osc_db_user();
$password= osc_db_password();
$db_name= osc_db_name();
$tbl_name= DB_TABLE_PREFIX."t_region"; // Table name
//Connect to server and select database. - This part below is causing error and will not display regions or update
mysql_connect("$host", "$username", "$password")or die("cannot connect");
mysql_select_db("$db_name")or die("cannot select DB");
if(isset($_POST['checkbox'])){$checkbox = $_POST['checkbox'];
if(isset($_POST['activate'])?$activate = $_POST["activate"]:$deactivate = $_POST["deactivate"])
$id = "('" . implode( "','", $checkbox ) . "');" ;
$sql="UPDATE $tbl_name SET featured = '".(isset($activate)?'Y':'N')."' WHERE pk_i_id IN $id" ;
$result = mysql_query($sql) or die(mysql_error());
} ?>