I am trying to insert data in custom table using ajax but Wordpresss Fatal error: Call to a member function insert() on null emerges my code is below global $wpdb; $my_user = $wpdb->prefix . 'my_users'; $name=$_POST[‘firstname’]; $email=$_POST[’email’]; echo $my_user.'<br />'; echo $name.'<br />'; echo $email.'<br />';   $wpdb->insert(      $my_user,      array(          'name' => […]

Hi guyz i have made a form but when i submit it its giving me the below error TokenMismatchException in compiled.php line 3166: whats missing in the form¬†? Form code <form name=”form1″ method=”post” action=”addit”> <table width=”200″ border=”1″> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td><a href=”/AddNew”>Add New</a> </td> </tr> <tr> <td>Name</td> <td colspan=”2″><input value=”” id=”name” name=”name”> </td> </tr> <tr> […]