Como agregar y actualizar registros desde un formulario