I'm editing something like this:
<form action="" method="post">
<select name="type">
<option>Default</option>
<option>Training Center</option>
</select>
</form>
What I want to do is select the option I wanted and update that into a database column...
$db = ConnectionManager::getDataSource('default');
$idselect = $db->query("SELECT max(id) FROM users");
$id = $db->query($idselect,'id');
$connect = $db->query("UPDATE users SET userType='".$_POST['type']."' Where id = '$id'");
But my problem is it still wont show in the database. Can anyone tell me what i'm doing wrong??
also the userType column I'm updating has a code like this
$userType = 'default';