>>45
やるなら
if(isset($_POST["key"])){
$key = (int)trim($_POST["key"]);
}else{
$key = 0;
}
$sql="SELECT * FROM usr WHERE uid = ".$key;
でいいんじゃないの?