Hi everyone,
My php code shows a form where date should be inserted then the date should be assigned to a variable. The trouble is that the value assigned vanishes !!
Here is the code:
And this is the error I recieve:
Thanks
My php code shows a form where date should be inserted then the date should be assigned to a variable. The trouble is that the value assigned vanishes !!
Here is the code:
Code:
<!doctype html>
<html lang=en>
<head>
<title>Show Date</title>
<meta charset=utf-8>
</head>
<body>
<?php
$dbcon = @mysqli_connect (DB_HOST, DB_USER, DB_PASSWORD, DB_NAME)
OR die ('Could not connect to MySQL: ' . mysqli_connect_error () );
mysqli_set_charset($dbcon, 'utf8');
$myDate = trim($_POST['exam_date']);
?>
<form action="Day_hours.php" method="post" >
<input id="exam_date" name="exam_date" type="datetime" />
<input id="submit"type="submit" name="submit" value="Show Date"/>
</form>
</body>
I wish someone would kindly help me with my unseen error.Notice: Undefined index: exam_date in C:\xampp\htdocs\test\Day_hours.php on line 12
Thanks