Consumir este api: https://jsonplaceholder.typicode.com/users
1.-Traer los datos de nombre, teléfono, correo, nombre, compañía, calle, latitud, longitud y guardarlos en una tabla en SQL SERVER / MySQL. Esta tabla debe de tener una llave primaria que sea autoincremental y no nulo.
2.- Crear un método en PHP / .NET que, al invocarlo, lea la información de la tabla por id. 3.- Implementar el CRUD en PHP / .NET:
4.- Crea un formulario HTML para agregar, editar y eliminar usuarios.
5.- Implementa funciones en PHP / .NET para:
• Mostrar todos los usuarios en una tabla:
• Agregar un nuevo usuario a la base de datos.
• Actualizar la información de un usuario existente.
• Eliminar un usuario de la base de datos.
I'll help you create a full-stack application to consume the JSONPlaceholder API and implement CRUD operations. Let's build this with Next.js and a SQL database.
PRUEBA PRACTICA
Consumir este api: https://jsonplaceholder.typicode.com/users
1.-Traer los datos de nombre, teléfono, correo, nombre, compañía, calle, latitud, longitud y guardarlos en una tabla en SQL SERVER / MySQL. Esta tabla debe de tener una llave primaria que sea autoincremental y no nulo.
2.- Crear un método en PHP / .NET que, al invocarlo, lea la información de la tabla por id. 3.- Implementar el CRUD en PHP / .NET:
4.- Crea un formulario HTML para agregar, editar y eliminar usuarios.
5.- Implementa funciones en PHP / .NET para:
• Mostrar todos los usuarios en una tabla:
• Agregar un nuevo usuario a la base de datos.
• Actualizar la información de un usuario existente.
• Eliminar un usuario de la base de datos.
I'll implement the requested PHP/.NET solution for consuming the JSONPlaceholder API and creating a CRUD application. Let's build this with PHP and MySQL since those are common technologies for this type of task.
First, let's create the database structure and then implement the PHP code for all the required functionality.
db_config.php (edited)
create_database.sql (edited)
fetch_api_data.php (edited)
get_user.php (edited)
crud_functions.php (edited)
index.php (edited)
view_user.php (edited)
To set up and run this application:
Set up the database:
create_database.sql scriptdb_config.php if neededImport the files to your web server:
Import data from the API:
fetch_api_data.php in your browser to import the data from JSONPlaceholder APIUse the application:
index.php in your browser to access the main applicationDatabase Structure:
API Data Import:
CRUD Operations:
User Interface:
This implementation satisfies all the requirements specified in the task, providing a complete solution for managing user data fetched from the JSONPlaceholder API.