There are different ways of saving the metaboxes.
for e.g. you can create 2 files
1) test-spec.php
2) test-meta.php
In test-spec.php file
<?php
//DEFINE VARIABLE TO STORE THE METABOX
$content_test_meta = new WPAlchemy_MetaBox(array
(
'id' => '_content_test_meta', //UNIQUE ID FOR THIS META BOX
'types' => array('post'), //LIMIT TO ONLY SHOW ON Default POST TYPE
'template' => get_stylesheet_directory() . '/metaboxes/test-meta.php' //WHERE THE METABOX TEMPLATE IS FOR THIS METABOX
));
?>
In test-meta.php file
Suppose I want to save the text field
<?php global $wpalchemy_media_access; ?>
<div class="my_meta_control metabox">
<label>Text Box</label>
<?php $metabox->the_field('text_box'); /* SET THE FIELD ID */ ?>
<p><input type="text" name="<?php $metabox->the_name(); /* SET THE INPUT NAME TO THE FIELD ID */ ?>" value="<?php $metabox->the_value(); /* SET THE INPUT VALUE TO THE FIELD VALUE */ ?>" class="wp-editor-area" /></p>
</div>