Código PHP:
Ver original<html lang="es">
<head>
<script>
function enviar_formulario(){
document.ruc.submit();
}
</script>
<title>CARGAR DATOS</title>
</head>
<form action="" name="ruc" method="post">
<body>
<input type="text" name="ruc" id="ruc" value="
<?php if(isset($_POST['ruc'])) { echo $row['ruc'] ; }?>" onKeyPress="if (event.keyCode == 13) enviar_formulario()" />
<input type="text" name="categoria" value="
<?php if(isset($_POST['categoria'])) { echo $row['categoria'] ; }?>" />
</body>
</form>
</html>
Asi quedo !