If I take Wordpresses AJAX/PHP example how would I call $whatever in another function? If I do get a result outside of the initial function (below) it is always 0.
add_action( 'wp_ajax_my_action', 'my_action_callback' );
function my_action_callback() {
global $wpdb; // this is how you get access to the database
$whatever = intval( $_POST['whatever'] );
$whatever += 10;
echo $whatever; //
die();
}
Wordpress AJAX plugin code example page
I suspect it is very simple but when you get in a certain mindset you cannot look beyond the blinders.
</div>