<?php
	include 'inc/conx.php';
	
	$uname = (trim($_POST['uname']));
	
	$sql = $db->query("INSERT INTO units (unit) VALUES ('$uname')");
	$sel = $db->query("SELECT * FROM units WHERE unit = '$uname'");
	$id  = $sel->fetchArray();

 		echo '<option value="'.$id['id'].'">'.$uname.'</option>';

	die();
?>

