Simple questions –> Custom Plugin integration
-
I have created a vary simple form that needs to write to the database.
2 Things i need to do
1. When the submit button is clicked write to the db
2. Add a link in the admin menu, either in the dashboard or otherwise so the form can be easily accessed.here is my code so far
<?php /* Template Name: connect */ if (isset( $_POST["flag"])) { global $wpdb; $id = $_POST["a"]; $id2 = $_POST["b"]; $query = "insert into wp_custom (id, id) values(".$id1.",".$id2.")"; echo $query; $wpdb->query( $query ); }else{ //inside the function list_id is the form. the action for the form is to post to itself list_id(); } ?>
If someone could help i would really appreciate it
Ilan
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Simple questions –> Custom Plugin integration’ is closed to new replies.