I want to create a new table in current database of word press through create a static page. I write code for this as below, but there was no result. Why is that, and how can I get this right?
<?php
/*
Template Name:Register Page
Template URI:
Author:yuva
Author URI:
Description:This Is Page for Gallery.
*/
get_header();
?>
<div class="regist">
<h2><?php the_title(); ?></h2>
<?php
global $wpdb;
$my_table=$wpdb->prefix.'your_users';
$sql="CREATE TABLE IF NOT EXISTS $my_table (id int(20) not null auto_increment,name varchar(40) not null,password varchar(20) notnull,PRIMARY KEY(id))";
include_once(ABSPATH.'wp-admin/includes/upgrade.php');
dbDelta($sql);
?>
</div>
<?php
get_footer();
?>