Couldn\'t find a straight answer to this. My custom wordpress php code seems to be executed twice when I click on the submit once. When clicked, the codes adds two cities wi
you execute the query twice:
$result = $db->query($query); if ($db->query($query) === TRUE) {
should be:
$result = $db->query($query); if ($result === TRUE) {