Create Customer Attribute in Magento Easily

<?php
$setup = new Mage_Customer_Model_Entity_Setup(‘core_setup’);
$setup->addAttribute(‘customer’, ‘glasses_prescription’, array(
‘type’     => ‘text’,
‘input’    => ‘hidden’,
‘visible’  => false,
‘required’ => false
));

if (version_compare(Mage::getVersion(), ‘1.6.0’, ‘<=’))
{
$customer = Mage::getModel(‘customer/customer’);
$attrSetId = $customer->getResource()->getEntityType()->getDefaultAttributeSetId();
$setup->addAttributeToSet(‘customer’, $attrSetId, ‘General’, ‘glasses_prescription’);
}

?>