Location: PHPKode > projects > phpSC > core/setserver.php
<?PHP
session_start();
require_once('../config.php');
require_once('functions.php');
$sql = "SELECT * FROM servers WHERE id = '".$_POST['serverchange']."' LIMIT 1";  
mysql_select_db(_MYSQL_DB,_MYSQL_CONNECT) or die("2: ".mysql_error()); 
$result = mysql_query($sql,_MYSQL_CONNECT) or die("1: ".mysql_error());
$server = mysql_fetch_array($result);     
$_SESSION['server_id'] = $server['id'];
$_SESSION['server_conf'] = $server['conf'];
$_SESSION['server_name'] = $server['name'];
$_SESSION['server_pid'] = $server['pid'];
$_SESSION['server_status'] = $server['status'];
header("Location:".$_POST['return']);
?>
Return current item: phpSC