Okay, I have a very weird problem and I don't know what can be causing it. I have been working with PHP for 3 years but I have no idea what is going on now. I used a very simple code using PDO to insert into db:
$db = new PDO('mysql:host=localhost;dbname=my_db', "root", "");
$del = $db->prepare("INSERT INTO tbl_rate VALUES(0, 1, 2, 3, 4)");
$del->execute();
Nothing more, there is only and tags but no thing more and what it does is that whenever I refresh the website it double inserts into database. I was looking at these 3 lines for 2 hours and I don't know why it always inserts twice.
If anyone ever had that problem please tell me how to solve it or what can be causing it :x Thank you!