Well this will require lots of code to be modified, need to convert each variable passed before adding to database.
ucwords(strtolower($string_variable));
in catalog/create_account.php around line 26
Find
Code:
$firstname = tep_db_prepare_input($_POST['firstname']);
$lastname = tep_db_prepare_input($_POST['lastname']);
if (ACCOUNT_DOB == 'true') $dob = tep_db_prepare_input($_POST['dob']);
$email_address = strtolower(tep_db_prepare_input($_POST['email_address']));
if (ACCOUNT_COMPANY == 'true') $company = tep_db_prepare_input($_POST['company']);
$street_address = tep_db_prepare_input($_POST['street_address']);
if (ACCOUNT_SUBURB == 'true') $suburb = tep_db_prepare_input($_POST['suburb']);
$postcode = tep_db_prepare_input($_POST['postcode']);
$city = tep_db_prepare_input($_POST['city']);
if (ACCOUNT_STATE == 'true') {
$state = tep_db_prepare_input($_POST['state']);
and replace with
Code:
/* OLD CODE
$firstname = tep_db_prepare_input($_POST['firstname']);
$lastname = tep_db_prepare_input($_POST['lastname']);
if (ACCOUNT_DOB == 'true') $dob = tep_db_prepare_input($_POST['dob']);
$email_address = strtolower(tep_db_prepare_input($_POST['email_address']));
if (ACCOUNT_COMPANY == 'true') $company = tep_db_prepare_input($_POST['company']);
$street_address = tep_db_prepare_input($_POST['street_address']);
if (ACCOUNT_SUBURB == 'true') $suburb = tep_db_prepare_input($_POST['suburb']);
$postcode = tep_db_prepare_input($_POST['postcode']);
$city = tep_db_prepare_input($_POST['city']);
if (ACCOUNT_STATE == 'true') {
$state = tep_db_prepare_input($_POST['state']);
*/
$firstname = ucwords(strtolower(tep_db_prepare_input($_POST['firstname'])));
$lastname = ucwords(strtolower(tep_db_prepare_input($_POST['lastname'])));
if (ACCOUNT_DOB == 'true') $dob = tep_db_prepare_input($_POST['dob']);
$email_address = strtolower(tep_db_prepare_input($_POST['email_address']));
if (ACCOUNT_COMPANY == 'true') $company = ucwords(strtolower(tep_db_prepare_input($_POST['company'])));
$street_address = ucwords(strtolower(tep_db_prepare_input($_POST['street_address'])));
if (ACCOUNT_SUBURB == 'true') $suburb = ucwords(strtolower(tep_db_prepare_input($_POST['suburb'])));
$postcode = strtoupper(tep_db_prepare_input($_POST['postcode']));
$city = ucwords(strtolower(tep_db_prepare_input($_POST['city'])));
if (ACCOUNT_STATE == 'true') {
$state = ucwords(strtolower(tep_db_prepare_input($_POST['state'])));
and in addressbook_process.php around line 38 Find
Code:
if (ACCOUNT_COMPANY == 'true') $company = tep_db_prepare_input($_POST['company']);
$firstname = tep_db_prepare_input($_POST['firstname']);
$lastname = tep_db_prepare_input($_POST['lastname']);
$street_address = tep_db_prepare_input($_POST['street_address']);
if (ACCOUNT_SUBURB == 'true') $suburb = tep_db_prepare_input($_POST['suburb']);
$postcode = tep_db_prepare_input($_POST['postcode']);
$city = tep_db_prepare_input($_POST['city']);
$country = tep_db_prepare_input($_POST['country']);
$email_address = tep_db_prepare_input($_POST['email_address']);
$telephone = tep_db_prepare_input($_POST['telephone']);
$fax = tep_db_prepare_input($_POST['fax']);
if (ACCOUNT_STATE == 'true') {
if (isset($_POST['zone_id'])) {
$zone_id = tep_db_prepare_input($_POST['zone_id']);
} else {
$zone_id = false;
}
$state = tep_db_prepare_input($_POST['state']);
}
Replace with:
Code:
/* OLD CODE
if (ACCOUNT_COMPANY == 'true') $company = tep_db_prepare_input($_POST['company']);
$firstname = tep_db_prepare_input($_POST['firstname']);
$lastname = tep_db_prepare_input($_POST['lastname']);
$street_address = tep_db_prepare_input($_POST['street_address']);
if (ACCOUNT_SUBURB == 'true') $suburb = tep_db_prepare_input($_POST['suburb']);
$postcode = tep_db_prepare_input($_POST['postcode']);
$city = tep_db_prepare_input($_POST['city']);
$country = tep_db_prepare_input($_POST['country']);
$email_address = tep_db_prepare_input($_POST['email_address']);
$telephone = tep_db_prepare_input($_POST['telephone']);
$fax = tep_db_prepare_input($_POST['fax']);
if (ACCOUNT_STATE == 'true') {
if (isset($_POST['zone_id'])) {
$zone_id = tep_db_prepare_input($_POST['zone_id']);
} else {
$zone_id = false;
}
$state = tep_db_prepare_input($_POST['state']);
}
*/
if (ACCOUNT_COMPANY == 'true') $company = ucwords(strtolower(tep_db_prepare_input($_POST['company'])));
$firstname = ucwords(strtolower(tep_db_prepare_input($_POST['firstname'])));
$lastname = ucwords(strtolower(tep_db_prepare_input($_POST['lastname'])));
$street_address = ucwords(strtolower(tep_db_prepare_input($_POST['street_address'])));
if (ACCOUNT_SUBURB == 'true') $suburb = ucwords(strtolower(tep_db_prepare_input($_POST['suburb'])));
$postcode = strtoupper(tep_db_prepare_input($_POST['postcode']));
$city = ucwords(strtolower(tep_db_prepare_input($_POST['city'])));
$country = tep_db_prepare_input($_POST['country']);
$email_address = tep_db_prepare_input($_POST['email_address']);
$telephone = tep_db_prepare_input($_POST['telephone']);
$fax = tep_db_prepare_input($_POST['fax']);
if (ACCOUNT_STATE == 'true') {
if (isset($_POST['zone_id'])) {
$zone_id = tep_db_prepare_input($_POST['zone_id']);
} else {
$zone_id = false;
}
$state = ucwords(strtolower(tep_db_prepare_input($_POST['state']));
}
this will solve 95% of your problem rest telephone number that have to be done using jscript during before post.
cheers