Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created September 30, 2020 02:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/562db64de916fb4dfa20dcbf5bfb62e2 to your computer and use it in GitHub Desktop.
Save parzibyte/562db64de916fb4dfa20dcbf5bfb62e2 to your computer and use it in GitHub Desktop.
<?php
$mysqli = include_once "conexion.php";
$id = $_POST["id"];
$nombre = $_POST["nombre"];
$descripcion = $_POST["descripcion"];
$sentencia = $mysqli->prepare("UPDATE videojuegos SET
nombre = ?,
descripcion = ?
WHERE id = ?");
$sentencia->bind_param("ssi", $nombre, $descripcion, $id);
$sentencia->execute();
header("Location: listar.php");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment