Create a PHP page that can accept (and process) the incoming value:
/MyHandler.php
<?php
$column = $_GET['column'];
$json = isset($_GET['json']);
$db = new PDO(...);
$q = $db->prepare('INSERT INTO mytable (column) VALUES (?)');
if ($q->execute(array($_GET['column'])) !== false){
return $json ? json_encode(array('success'=>true)) : "Success";
}else{
return $json ? json_encode(array('success'=>false)) : "Fail";
}
Then either wrap your select in a <form> and submit it to a php page or use AJAX and submit it to the same page (which would not involve a page refresh).
Form Method:
<form action="/MyHandler.php" method="GET">
<select name="column" id="column">....</select>
<input type="submit" value="Save Column">
</form>
Or, the jQuery/AJAX equivalent:
$('#column').change(function(){
var val = $(this).val();
$.getJSON('/MyHandler.php',{column:val,json:true},function(d){
alert(d.success ? 'Value saved' : 'Value could not be saved');
});
});
https://www.google.com get select value phpput that in your browser and read