there is you answer, in your code where it says:
// Do something with $mydata probably using add_post_meta(), update_post_meta(), or
a custom table (see Further Reading section below)
you need to actually insert/update the data to the database
so add something like:
global $post;
update_post_meta($post->ID, 'myplugin_new_field', $mydata);
and the data will be saved so you could get it using your code:
$meta = get_post_meta($post->ID, 'myplugin_new_field');
and the only other change you need is in the function that displays the metabox change:
echo '<input type="text" id="myplugin_new_field" name="myplugin_new_field" value="whatever" size="25" />';
to
echo '<input type="text" id="myplugin_new_field" name="myplugin_new_field" value="'.get_post_meta($post->ID, 'myplugin_new_field',true).'" size="25" />';
Update:
To answer your question in the comments:
to save a select list you save it just the save way as a text input and to display the previously selected option in the meta box you just loop over the option and see what was selected and you add “selected” attribute.
for example :
//get last selected value if exists
$selected = get_post_meta($post->ID, 'myplugin_new_select_field',true);
echo '<select name="myplugin_new_select_field">';
$x = 0;
while ($x < 4){
echo '<option value="'.$x.'"';
//check if the last value is the same is current value.
if ($x == $selected)
echo ' selected="selected"';
echo '>'.$x.'</option>';
}
echo '</select>';