-
-
Save ricardosiri68/5282495 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$fecha = $_POST['fecha']; | |
$hora = $_POST['hora']; | |
$nombre = $_POST['nombre']; | |
$apellido = $_POST['apellido']; | |
$conexion = mysql_connect("localhost","user","pass"); | |
mysql_select_db("db",$conexion); | |
$sql= "INSERT INTO tabla (Fecha, Hora, Nombre, Apellido) VALUES ( '{$fecha}', '{$hora}','{$nombre}','{$apellido}')"; | |
$result = mysql_query($sql); | |
echo 'Datos cargados!'; | |
$res = mysql_query ("select max(Id) AS id from tabla", $conexion); | |
while ($row = mysql_fetch_object($res)) | |
{ | |
echo 'Id Número:'.$row->id.'</br>'; | |
} | |
echo '<a href="../index.html">Volver</a>'; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment