how to add html elements inside block and get data when saving i want to add few html elements call first name and last name,company name in top of user/register page and save that data when user click create account button..,how can i achieve that,i add html elements  in block as normal html tags like 
but dont't kow how to get data...thanks
Does it have to be in a block?

If you want to add fields to the registration form and do something with the values when they submit, you really have to add them to the registration form itself, not in a block somewhere nearby.

To do this you can create a custom module that implements a form alter.

For example:

/**
 * Implements hook_form_BASE_FORM_ID_alter().
 */
function MODULENAME_form_user_register_form_alter(&amp;$form, &amp;$form_state) {
  // Add your fields.
  $form['firstname'] = array(
    '#type' =&gt; 'textfield',
    '#title' =&gt; t('First name'),
    '#description' =&gt; t("This is help text that will display with this field. you can leave it off if you don't need it."),
    '#required' =&gt; TRUE, // Leave this line out if you don't want a required field.
    '#weight' =&gt; -10, // This controls the field order. Smaller number is higher up the form.
  );
  $form['lastname'] = array(
    '#type' =&gt; 'textfield',
    '#title' =&gt; t('Last name'),
  );
  $form['company'] = array(
    '#type' =&gt; 'textfield',
    '#title' =&gt; t('Company'),
  );

  // Add your own submit handler to save the values.
  $form['#submit'][] = 'MODULENAME_custom_submit_handler';
}

/**
 * Custom submit handler for user register form.
 */
function MODULENAME_custom_submit_handler($form, &amp;$form_state) {
  // Do whatever you need to save the values here.
  // Submitted values are in $form_state['values'] like this.
  $fname = $form_state['values']['first_name'];
  $lname = $form_state['values']['last_name'];
  $company = $form_state['values']['company'];
}


Now having said all that, is there some reason you want to do this custom?
It is possible to use a module that lets you add fields to the register form, like the profile2 module.
That module lets you add profiles (essentially a group of fields, similar to a node) to users, which can also be displayed on the registration form for the user to fill out at that point.

The module handles saving the data for you, along with a lot of other features, like views support.