Convert letters


english 25938

Convert letters

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;
      }
    }

Average overall rating
 off 1 Rating
Awarded 1 x 5  Stars
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?
Information(1)
General information
 Free advertising
Post counter
Current information status:
Categories: 9
Posts: 104
Support pages: 57
Downloads for members: 104
Download counter: 646
Reviews total106
Companies: 34
Support: 65
Information: 7