I have a registration form which contains firstname, lastname, organisation, username, email etc. Here Username and email only will be saved in the db in the wp_users table.
I have created a new table called wp_userdata to show all other details such as firstname, lastname, organisation etc.
Now I need to know how I can make the data from front end to be added in the custom table I have created. The following code is the one which I use to create the registration form. Someone please help me.
<div id="tab2_login" class="tab_content_login" style="display:none;">
<h3>Sign Up</h3>
<p>We encourage you to do a one-time signup with us to be able to download content from this website</p>
<form method="post" action="<?php echo site_url('wp-login.php?action=register', 'login_post') ?>" class="wp-user-form">
<div class="username">
<label for="title"><?php _e('Title'); ?>: </label>
<Select>
<option>Mr</option>
<option>Ms</option>
<option>Mrs</option>
</select>
</div>
<div class="username">
<label for="user_login"><?php _e('First Name'); ?>: </label>
<input type="text" name="first_name" value="<?php echo esc_attr(stripslashes($first_name)); ?>" size="20" id="first_name" tabindex="101" required/>
</div>
<div class="username">
<label for="user_login"><?php _e('Middle Name'); ?>: </label>
<input type="text" name="middle_name" value="<?php echo esc_attr(stripslashes($middle_name)); ?>" size="20" id="middle_name" tabindex="101" />
</div>
<div class="username">
<label for="user_login"><?php _e('Last Name'); ?>: </label>
<input type="text" name="last_name" value="<?php echo esc_attr(stripslashes($last_name)); ?>" size="20" id="last_name" tabindex="101" required/>
</div>
<div class="username">
<label for="user_login"><?php _e('Username'); ?>: </label>
<input type="text" name="user_login" value="<?php echo esc_attr(stripslashes($user_name)); ?>" size="20" id="user_login" tabindex="101" required />
</div>
<div class="password">
<label for="user_email"><?php _e('Email Address'); ?>: </label>
<input type="text" name="user_email" value="<?php echo esc_attr(stripslashes($user_email)); ?>" size="25" id="user_email" tabindex="102" required/>
</div>
<div class="password">
<label for="organisation"><?php _e('Organisation'); ?>: </label>
<input type="text" name="organisation" value="<?php echo esc_attr(stripslashes($user_org)); ?>" size="25" id="organisation" tabindex="102" />
</div>
<div class="password">
<label for="Designation"><?php _e('Designation'); ?>: </label>
<input type="text" name="Designation" value="<?php echo esc_attr(stripslashes($user_desig)); ?>" size="25" id="designation" tabindex="102"/>
</div>
<div style="width:100px;position:relative;float:left;margin: 7px 0 0 0;">
<input type="button" name="user-cancel" value="<?php _e('Cancel'); ?>" id="user-cancel" tabindex="103" />
</div>
<div class="login_fields">
<?php do_action('register_form'); ?>
<input type="submit" name="user-submit" value="<?php _e('Sign up!'); ?>" class="user-signup" tabindex="103" />
<?php $register = $_GET['register']; if($register == true) { echo '<p>Check your email for the password!</p>'; } ?>
<input type="hidden" name="redirect_to" value="<?php echo $_SERVER['REQUEST_URI']; ?>?register=true" />
<input type="hidden" name="user-cookie" value="1" />
</div>
</form>
</div>
