Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $servername = "192.168.10.10";
- $username = "homestead";
- $password = "secret";
- $dbname = "ventapasajes";
- // Create connection
- $conn = mysqli_connect($servername, $username, $password, $dbname);
- // Check connection
- if (!$conn) {
- die("Connection failed: " . mysqli_connect_error());
- }
- $fecha = date('Y-m-d', strtotime($_GET["f"]));
- $horaSalida = $_GET["s"];
- $horaLlegada = $_GET["l"];
- $busId = $_GET["b"];
- $origenId = $_GET["o"];
- $destinoId = $_GET["d"];
- $valor = $_GET["v"];
- $sql = "CALL registro_servicio('".$fecha."', '".$horaSalida."', '".$horaLlegada."', ".$busId.", ".$origenId.", ".$destinoId.", ".$valor.")";
- $result = mysqli_query($conn, $sql);
- if (mysqli_query($conn, $sql)) {
- echo "<h1>Registro exitoso</h1>";
- } else {
- echo "Error: " . $sql . "<br>" . mysqli_error($conn);
- echo "<br> Fecha: ". $fecha;
- }
- mysqli_close($conn);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement