I would like help with this code, I do not want to save date and time and date.
follow code:
<? include "conexion.php";
if(isset($_POST['submit'])) {
$data = str_replace($_POST['data']);
$data_cadastro = $data;
$hora_inicio = "07:45:00";
$hora_final = "09:00:00";
$ini = strtotime($hora_inicio);
$fim = strtotime($hora_final);
$atu = $ini; $i = 0; for ($atu = $ini;
$atu < $fim; $atu = strtotime('+15 minutes', $atu)) { $hora = date('H:i', $atu);
$sql = mysql_query("INSERT INTO teste (id,hora,data) VALUES('','$hora','$data')");
$msg = 'Agenda Aberta do dia ' .$data_cadastro. ' com Successo<br/>';
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>agenda</title>
</head>
<body>
<form action="agenda.php" method="post">
data:<input type="date" name="data">
<input type="submit" name="submit" value="agendar">
</body>
</html>