create table and insert data in wordpress plugin

PHP
<?php
function table_create()
{
global $wpdb;
$table_name = $wpdb->prefix . "wpactable"; 
$charset_collate = $wpdb->get_charset_collate();
 $sql = "CREATE TABLE IF NOT EXISTS $table_name (
  id mediumint(9) NOT NULL AUTO_INCREMENT,
  name tinytext NOT NULL,
  email tinytext NOT NULL,
  number tinytext NOT NULL,
  Website text NOT NULL,
  PRIMARY KEY  (id)
) $charset_collate";
require_once( ABSPATH .'wp-admin/includes/upgrade.php' );
dbDelta( $sql );
}
function inseruser()
{global $wpdb;
$table_name = $wpdb->prefix . "wpactable"; 
$wpdb->insert('wp_wpactable',
array('name'=>$name,
'email'=>$email,
'number'=>$number,
'Website'=>$Website),
array('%s','%s'));
register_activation_hook(__FILE__, 'table_create' );
register_activation_hook(__FILE__, 'inseruser' );
?>
<?php
function table_create()
{
global $wpdb;
$table_name = $wpdb->prefix . "wpactable"; 
$charset_collate = $wpdb->get_charset_collate();
 $sql = "CREATE TABLE IF NOT EXISTS $table_name (
  id mediumint(9) NOT NULL AUTO_INCREMENT,
  name tinytext NOT NULL,
  email tinytext NOT NULL,
  number tinytext NOT NULL,
  Website text NOT NULL,
  PRIMARY KEY  (id)
) $charset_collate";
require_once( ABSPATH .'wp-admin/includes/upgrade.php' );
dbDelta( $sql );
}

?>function myplugin_update_db_check() {
    global $jal_db_version;
    if ( get_site_option( 'jal_db_version' ) != $jal_db_version ) {
        jal_install();
    }
}
add_action( 'plugins_loaded', 'myplugin_update_db_check' );

Source

Also in PHP: