Google Analytics and Booking Content type

I have content type booking and created booking page in drupal 7 and same page is displaying error, confirmation and booking page. I am trying to split into three different pages(nodes) using same booking content type. I am using custom module for booking.

After booking, I would like to redirect to xyz.com/booking-confirm if it’s successfully booking and if it’s error xyz.com/booking-error and currently, using xyz.com/booking for all actions.

Should I use header to redirect it?

header('Location: /booking-confirm'); 
header('Location: /booking-error'); 

Should I hook them in template.php?

function MYMODULE_user_register_form($form, &$form_state) {
  $form_state['redirect'] = 'path/to/somewhere';
}

I am not sure, which is correct option to figure it out. I would like to split the URL using same content type. Any approach to solve the issue.


Source: https://www.drupal.org/taxonomy/term/4/feed