Location: PHPKode > projects > phpSC > modules/changeserver.php
<?PHP
if(isset($_SESSION['id'])) {
?>
<form name="form1" method="post" action="core/setserver.php">
  <label>Change Server:
  <select name="serverchange" onChange="this.form.submit()">
<?PHP
$sql = "SELECT * FROM servers";
$result = mysql_query($sql,$conn);
while($data = mysql_fetch_array($result)) {
	if($data['id'] == $_SESSION['server_id']) {
?>
<option value="<?=$data['id']?>" selected><?=$data['name']?></option>
<?PHP
} else {
?>
<option value="<?=$data['id']?>"><?=$data['name']?></option>
<?PHP
}
}
?>
  </select>
  <input type="hidden" name="return" value="<?=$_SERVER['REQUEST_URI']?>">
  </label>
<noscript>
<input type="submit" value="Go" id="mySubmit" />
</noscript>

</form>
<?PHP
}
?>
Return current item: phpSC