hi im trying to edit the registration page and the user information pages
Im having some problems draging the data from the sql and iv just abouts bust my limit of searching for variables.
i have edited
Pref_form<tr>
<td width="140"><?php echo $TEXT['ADDRESS']; ?>:</td>
<td>
<input type="text" name="address" style="width: 380px;" maxlength="255" value="<?php echo $wb->get_address(); ?>"/>
</td>
</tr>
Prefs for when the data is updated// Set the page content include file
if(isset($_POST['current_password']) AND isset($_POST['new_password'])) {
define('PAGE_CONTENT', WB_PATH.'/account/password.php');
} elseif(isset($_POST['current_password']) AND isset($_POST['email'])) {
define('PAGE_CONTENT', WB_PATH.'/account/email.php');
} elseif(isset($_POST['display_name'])) {
define('PAGE_CONTENT', WB_PATH.'/account/details.php');
} elseif(isset($_POST['address'])) {
define('PAGE_CONTENT', WB_PATH.'/account/details.php');
} else {
define('PAGE_CONTENT', WB_PATH.'/account/preferences_form.php');
}
details// Get entered values
$display_name = $wb->add_slashes(strip_tags($wb->get_post('display_name')));
$address = $wb->add_slashes(strip_tags($wb->get_post('address')));
$cf = $wb->add_slashes(strip_tags($wb->get_post('cf')));
$language = $wb->get_post_escaped('language');
$timezone = $wb->get_post_escaped('timezone')*60*60;
$date_format = $wb->get_post_escaped('date_format');
$time_format = $wb->get_post_escaped('time_format');
// Create a javascript back link
$js_back = "javascript: history.go(-1);";
// Update the database
$database = new database();
$query = "UPDATE ".TABLE_PREFIX."users SET display_name = '$display_name', language = '$language', timezone = '$timezone', date_format = '$date_format', address = '$address', cf = '$cf', time_format = '$time_format' WHERE user_id = '".$wb->get_user_id()."'";
$database->query($query);
if($database->is_error()) {
$wb->print_error($database->get_error,'index.php',false);
} else {
$wb->print_success($MESSAGE['PREFERENCES']['DETAILS_SAVED'], WB_URL.'/account/preferences.php');
$_SESSION['DISPLAY_NAME'] = $display_name;
$_SESSION['ADDRESS'] = $address;
$_SESSION['CF'] = $cf;
$_SESSION['LANGUAGE'] = $language;
$_SESSION['TIMEZONE'] = $timezone;
class.wb//Get the current users address
function get_address(){
return $_SESSION['ADDRESS'];
}
//Get the current users Codice Fiscale
function get_cf(){
return $_SESSION['CF'];
}
I have checked all the other files for the other vairiables and can nto find anything i can not see the error atall.
My servers php and SQL is all up to date and the names in the sql are direct copies to the php script.
Can anyone help me with this please. it would be much apriciated
Anthony