Tips and Tricks HQ Support

Support site for Tips and Tricks HQ premium products

  • Home
  • Contact Us
  • Documentation
  • Forum Home
    • Forum
    • Forum Search
    • Forum Login
    • Forum Registration

Reply To: wp_eMember_profile_edit_form fields not shown in form

by

Tips and Tricks HQ Support Portal › Forums › WP eMember › wp_eMember_profile_edit_form fields not shown in form › Reply To: wp_eMember_profile_edit_form fields not shown in form

December 16, 2009 at 2:44 am #16684
gstout
Member

Here is my code if you’d like to use it. PS I think you should add a Company field, that’s very common and useful for when an Organization joins that isn’t just one person. You might want to make first and last name required an optional setting.

function show_edit_profile_form()
{
global $wpdb;
if($_POST['eMember_update_profile'] == 'Update')
{
$fields = array();
$fields['first_name'] = $_POST['afirstname'];
$fields['last_name'] = $_POST['alastname'];
$fields['address_street'] = $_POST['aaddressstreet'];
$fields['address_city'] = $_POST['aaddresscity'];
$fields['address_state'] = $_POST['aaddressstate'];
$fields['address_zipcode'] = $_POST['aaddresszipcode'];
$fields['country'] = $_POST['acountry'];
$fields['email'] = $_POST['aemail'];
$fields['password'] = $_POST['pwd'];
dbAccess::update(WP_EMEMBER_MEMBERS_TABLE_NAME, ' member_id ='. $wpdb->escape($_POST['member_id']), $fields);
$output .= "Your profile has been updated!";
}
else
{
global $auth;
$member_id = $auth->getUserInfo('member_id');
$resultset = dbAccess::find(WP_EMEMBER_MEMBERS_TABLE_NAME, ' member_id=' . $wpdb->escape($member_id));
$username = $resultset->user_name;
$first_name = $resultset->first_name;
$last_name = $resultset->last_name;
$address_street = $resultset->address_street;
$address_city = $resultset->address_city;
$address_state = $resultset->address_state;
$address_zipcode = $resultset->address_zipcode;
$country = $resultset->country;
$email = $resultset->email;
$password = $resultset->password;

$output .= '
<form action="" method="post" name="profileUpdateForm" id="profileUpdateForm" >
<table width="95%" border="0" cellpadding="3" cellspacing="3" class="forms">';

$output .= '<input type="hidden" name="member_id" id="member_id" value ="'.$member_id.'"/>';
$output .= '<tr><td><label class="eMember_label">Username: </label></td>';
$output .= '<td><label class="eMember_highlight">'.$username.'</label></td></tr>';
$output .= '
<tr>
<td><label for="afirstname" class="eMember_label">First Name: </label></td>
<td><input type="text" name="afirstname" size=20 value="'.$first_name.'" class="eMember_text_input"></td>
</tr>
<tr>
<td><label for="alastname" class="eMember_label">Last Name: </label></td>
<td><input type="text" name="alastname" size=20 value="'.$last_name.'" class="eMember_text_input"></td>
</tr>
<tr>
<td><label for="aaddressstreet" class="eMember_label">Street: </label></td>
<td><input type="text" name="aaddressstreet" size=20 value="'.$address_street.'" class="eMember_text_input"></td>
</tr>
<tr>
<td><label for="aaddresscity" class="eMember_label">City: </label></td>
<td><input type="text" name="aaddresscity" size=20 value="'.$address_city.'" class="eMember_text_input"></td>
</tr>
<tr>
<td><label for="aaddressstate" class="eMember_label">State: </label></td>
<td><input type="text" name="aaddressstate" size=20 value="'.$address_state.'" class="eMember_text_input"></td>
</tr>
<tr>
<td><label for="aaddresszipcode" class="eMember_label">Zip Code: </label></td>
<td><input type="text" name="aaddresszipcode" size=20 value="'.$address_zipcode.'" class="eMember_text_input"></td>
</tr>
<tr>
<td><label for="acountry" class="eMember_label">Country: </label></td>
<td><input type="text" name="acountry" size=20 value="'.$country.'" class="eMember_text_input"></td>
</tr>
<tr>
<td><label for="aemail" class="eMember_label">Email: </label></td>
<td><input type="text" name="aemail" size=20 value="'.$email.'" class="eMember_text_input"></td>
</tr>
<tr>
<td><label for="pwd" class="eMember_label">Password: </label></td>
<td><input type="password" name="pwd" size=20 value="'.$password.'" class="eMember_text_input"></td>
</tr>
<tr><td></td><td><input class="eMember_button" name="eMember_update_profile" type="submit" id="eMember_update_profile" class="button" value="Update"></td></tr>
</table>
</form>';
}
return $output;
}

Forum Related

  • Forum Home
  • Forum Search
  • Forum Registration
  • Forum Login

Support Related Forms

  • Contact Us
  • Customer Support
  • Request a Plugin Update
  • Request Fresh Download Links

Useful Links

  • Plugin Upgrade Instructions
  • WP eStore Documentation
  • WP eMember Documentation
  • WP Affiliate Platform Documentation
  • Tips and Tricks HQ Home Page
  • Our Projects

Quick Setup Video Tutorials

  • WP eStore Video Tutorial
  • WP eMember Video Tutorial
  • WP Affiliate Platform Video Tutorial
  • Lightbox Ultimate Video Tutorial

Our Other Plugins

  • WP Express Checkout
  • Stripe Payments Plugin
  • Simple Shopping Cart Plugin
  • Simple Download Monitor

Copyright © 2025 | Tips and Tricks HQ