How i can show the value of submitted form I have implemented normal form in drupal 7 , and i want to show the value it is retrieve by this functions (submit)

function parkingcalulator_form_submit($form, &amp;$form_state) {

    $parkingType = $form_state['values'] ['parking_type'];
    $totalCost = 0;

    $from = strtotime($form_state['values']['from_date']);
    $to = strtotime($form_state['values']['from_time']);

    $difference = $to - $from;
    $timeInHours = floatval($difference) / floatval(60*60);



    //// if the start time is greater than the end time set the error here
    if ($timeInHours &lt;= 0 )
    {
        form_set_error('$timeInHours',t('Time inserted error'));
    }


    if ($parkingType == 0) {
        // Normal
        if ( $timeInHours &lt; 200 )
        {
            $totalCost = calculateShortTermParkingCost($timeInHours);
        } else {
            $totalCost = calculateLongTermParkingCost($timeInHours);
        }
    } else if ($parkingType == 1) {
        /// Valet
        $totalCost = calculateValetParkingCost($timeInHours);
    }

     return $totalCost;

}


it does not show the value of  (return $totalCost) ,how i can get the value on it
First of all the validation should not be done in the form submit function. It should be done in a validate function.

For example in your case there would be an additional function which would look like  

 function parkingcalulator_form_validate($form, &amp;$form_state)
 {
    $from = strtotime($form_state['values']['from_date']);
    $to = strtotime($form_state['values']['from_time']);

    $difference = $to - $from;
    $timeInHours = floatval($difference) / floatval(60*60);
    if ($timeInHours &lt;= 0 )
        {
            form_set_error('from_time',t('Time inserted error'));
        }
    }


If you want to display the result with in the form, after submitting then you would add a value to the form_state with in your form_submit function such as 

$form_state['total_cost'] = $totalCost;


And then tell the form to rebuild by adding this code again in the form_submit function

$form_state['rebuild'] = TRUE;


Now with in the function you create the form the variable $form_state['total_cost'] would be available. you place that in a form element of the type markup. something like this

if(isset($form_state['total_cost']))
{
$form['total_cost'] = array(

  '#markup' =&gt; t('Total Cost is : ') . $form_state['total_cost'],

);
}


The if condition is used so that it is not executed in the first stage when the form is not submitted as the value is not yet there in the variable. The above code should go in the form function in your case parkingcalulator_form($form, &amp;$form_state) 

For more details examples you should refer the Examples Module which has a submodule called Form Examples.