If you only want the ID of a record, make your query return just an ID:
$query = "SELECT id
from Province_State
WHERE Prov_ST='".mysql_real_escape_string( $Prov_ST ) ."'";
if( !( $res = mysql_query( $query ) ) ){
die( mysql_error() );
}
list( $Prov_ST_ID ) = mysql_fetch_row( $res );
You could make this a function if it would be useful:
function find_id( $table, $column, $value ) {
$query = "SELECT id
from $table
WHERE $column = '".mysql_real_escape_string($value)."'";
if( !( $res = mysql_query( $query ) ) ){
die( mysql_error() );
}
list( $id ) = mysql_fetch_row( $res );
return $id;
}