I am stuck with my php code. Parent php page reload again after header() works, Here is my code
<?php
$mysqli = new mysqli("localhost", "root", "root", "testing");
/* check connection */
if ($mysqli->connect_errno) {
printf("Connect failed: %s\n", $mysqli->connect_error);
exit();
}
$sql ="update test set hit_count = hit_count+1";
$result = $mysqli->query($sql);
header('Location: http://www.google.com/');
die();
?>
Here some times i got 2 hit_count from db. How it works, i added die() after header().