Professional Documents
Culture Documents
Hiber Hdz.
Hiber Hdz.
php:
<!DOCTYPE html>
<html >
<head>
<meta charset="UTF-8">
<title>Consulta MySQL- Tutorial 18</title>
</head>
<body>
<?php
$conexion = mysql_connect("localhost", "root", "root");
mysql_select_db("tutorial17", $conexion);
mysql_query("SET NAMES 'utf8'");
?>
<form action="respuesta.php" method="POST">
<select name="usuario">
<?php
while ($row=mysql_fetch_array($resultado))
{
echo "<option>";
echo $row[0];
echo "</option>";
}
mysql_close();
?>
</select><br>
<input type="date" name="fecha" ><br>
<input type="submit" name="Enviar" >
</form>
</body>
</html>
respuesta.php:
<!DOCTYPE html>
<html>
<head>
<title>Respuesta MySQLL - Tutorial 18</title>
<meta charset="UTF-8">
</head>
<body>
<?php
$conexion = mysql_connect("localhost", "root", "root");
mysql_select_db("tutorial17", $conexion);
mysql_query("SET NAMES 'utf8'");
while ($row=mysql_fetch_array($resultado))
{
echo "[";
echo ($row[0]*1000)-10800000; //le resto 3 horas = 10800000 mill
echo ",";
echo $row[1];
echo "],";
}
}
?>
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<script>