postback not working
-
I have created a form that displays a form on load and when the user clicks the “submit” button using get method the form postsback to itself and is supposed to add a record to the DB.
the page loads up fine hyowever when you postback a “page not found” error appears.
anyone know why?
Page code
<?php get_header(); ?> <?php /* Template Name: Tag Connect */ global $wpdb; if (isset( $_GET["flag"])) { $catid = $_GET["category"]; $tagid = $_GET["tag"]; $query = "insert into wp_tag2cat (cat_id, tag_id) values(".$catid.",".$tagid.")"; echo $query; $myrows = $wpdb->query( $query ); }else{ list_cat_tag(); } ?> <?php get_footer(); ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘postback not working’ is closed to new replies.