insert into table and refresh issue
-
Hi All,
I have written a little piece of code that will insert a word into a wp custom db table after submit in wp admin panel.
Now when i hit F5, it will insert the data a second time. How can i solve this
if (!empty($_POST['add_bcw']) && ($_POST['add'] == 'add_word')) { $insert_data = "INSERT INTO " . wp_badcommentswords . " (bcw_name) " . "VALUES ('" . $_POST['add_bcw'] . "')"; $results = $wpdb->query($insert_data); }
How do i solve this ?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘insert into table and refresh issue’ is closed to new replies.