Hi Everyone,
This is the HTML page I created for input:
HTML Code:
 <form action = "insert_persons.php" method="GET">
	startdate: <input type ="text" name="startDate">
	enddate: <input type ="text" name="endDate">
	<input type="submit">
This is insert_persons.php file that contains the code to insert data from HTML page into MySql table
PHP Code:
echo $_GET['startDate'];
// Check connection
if (mysqli_connect_errno())
"Failed to connect to MySQL: " mysqli_connect_error();

$sql="INSERT INTO persons (startDate, endDate, intervalTime)

if (!
'Error: ' mysqli_error($con));
"1 record added";
Here is the data I assigned in the HTML page:
startdate- 2013-07-02 11:00:00
enddate- 2013-07-02 14:45:00
When I press the "Submit" button something strange happens: On the screen I get the code of php file shown above.
The code doesn't update the MySql table. It just appears on the screen.
Any idea what goes wrong?