Convert letters


english 2777

If a new customer writes the letters in lower case instead of uppercase when registering, this entry in the database can be automatically corrected. Example: john doe becomes John Doe

Find in: catalog/create_account.php

    $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 = 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']);
      if (isset($_POST['zone_id'])) {
        $zone_id = tep_db_prepare_input($_POST['zone_id']);
      } else {
        $zone_id = false;
      }
    }

Change to:

    $firstname = tep_db_prepare_input(ucwords($_POST['firstname']));
    $lastname = tep_db_prepare_input(ucwords($_POST['lastname']));
    if (ACCOUNT_DOB == 'true') $dob = tep_db_prepare_input($_POST['dob']);
    $email_address = tep_db_prepare_input($_POST['email_address']);
    if (ACCOUNT_COMPANY == 'true') $company = tep_db_prepare_input(ucwords($_POST['company']));
    $street_address = tep_db_prepare_input(ucwords($_POST['street_address']));
    if (ACCOUNT_SUBURB == 'true') $suburb = tep_db_prepare_input(ucwords($_POST['suburb']));
    $postcode = tep_db_prepare_input($_POST['postcode']);
    $city = tep_db_prepare_input(ucwords($_POST['city']));
    if (ACCOUNT_STATE == 'true') {
      $state = tep_db_prepare_input(ucwords($_POST['state']));
      if (isset($_POST['zone_id'])) {
        $zone_id = tep_db_prepare_input($_POST['zone_id']);
      } else {
        $zone_id = false;
      }
    }
Why your email address?
If necessary, I will contact you to help you with the implementation.
Your email address will not be made public.
Is this post helpful to you?
There are currently no product reviews.
Information(2)
General information
 Free advertising
 Lazy Loading
Post counter
Current information status:
Categories: 8
Posts: 104
Support pages: 54
Downloads for members: 104
Download counter: 646
Reviews total58
Companies: 26
Support: 25
Information: 7