Entradas

Mostrando entradas de enero, 2024

MOSTRAR EN UNA TABLA LA FECHA PERO CON FORMATO dd-mm-yyyy jquery php mysql

COMO MOSTRAR EN UNA TABLA LA FECHA PERO CON FORMATO  dd-mm-yyyy la conversion para mostrarlo con jquery ChatGPT Si deseas mostrar la fecha en formato 'dd-mm-yyyy' en una tabla utilizando jQuery, puedes hacerlo mediante la biblioteca moment.js para formatear la fecha. Asegúrate de incluir la biblioteca moment.js en tu proyecto. Aquí hay un ejemplo de cómo podrías lograrlo: Modifica el código PHP para devolver la fecha en formato 'dd-mm-yyyy': php Copy code <?php // Conectar a la base de datos (reemplaza con tus credenciales) $servername = "localhost"; $username = "tu_usuario"; $password = "tu_contraseña"; $dbname = "tu_base_de_datos"; $conn = new mysqli($servername, $username, $password, $dbname); // Verificar la conexión if ($conn->connect_error) {     die("Conexión fallida: " . $conn->connect_error); } // Obtener la fecha de la base de datos (por ejemplo, en una consulta SELECT) $sql = "SELECT nombre_campo...

INSERTAR Y UPDATE FECHA CON PHP MYSQL EN FORMULARIO METODO POST CON JQUERY ETIQUETA DATE

COMO INSERTAR FECHA CON PHP MYSQL EN FORMULARIO METODO POST CON JQUERY ETIQUETA DATE ChatGPT Para insertar una fecha con PHP y MySQL en un formulario usando el método POST con jQuery y la etiqueta date, puedes seguir estos pasos. Asumiré que estás utilizando un formulario HTML con un campo de fecha: Crear el formulario HTML: html Copy code <!DOCTYPE html> <html lang="es"> <head>     <meta charset="UTF-8">     <meta name="viewport" content="width=device-width, initial-scale=1.0">     <title>Formulario de Fecha</title>     <!-- Agregar jQuery -->     <script src="https://code.jquery.com/jquery-3.6.4.min.js"></script> </head> <body>     <form id="miFormulario">         <label for="fecha">Fecha:</label>         <input type="date" id="fecha" name="fecha" required>         <but...

UPDATE Y INSERT FORMATO FECHA MYSQL PHP JQUERY

  Basic AJAX CRUD app using PHP, MySQL and jQuery CODE PHP DEVELOPMENT TUTORIALS January 23, 2021 4 Comments  SHARE  3 We are going to build a basic AJAX CRUD app from scratch using only PHP, MySQL and jQuery AJAX. CRUD is an acronym for Create, Read, Update, Delete. Basic operations that are at the heart of all web apps. We will use Bootstrap for the layout and utilize other jQuery plugins for the UI. But first, the file structure. /db – The directory that has all the server and database related files  env.php – environment settings for database, server and miscellaneous display options generate-db.php – creates a database based on the details set in the env. file create-table.php -creates a table based on the details set in the env. file connect-db.php – global include for databases connection /api – The directory that has all endpoint related files  create.php – all the code and mySQL statements for inserting records delete.php – all the code and mySQL statem...