Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Need Capital postcode


Zalm

Recommended Posts

Posted

Hi,

 

I need some help. In create_account page I need to force my costomer to enter the postcode in capital only. How can I set the postcode field to only accept capital and dispay a warning message when the post code is not in capital.

 

 

Thank

Posted

Yes, but I don't have any idea how to do that. do you have a php way to do that?

 

Thanks

Posted

Untested:

 

Change

    $postcode = tep_db_prepare_input($HTTP_POST_VARS['postcode']);

to

$postcode = strtoupper(tep_db_prepare_input($HTTP_POST_VARS['postcode']));

in both create_account.php and address_book_process.php

 

In general, you should not follow up your own post, and if you feel you have to, then don't do it in less than an hour.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...