all vars that are posted or get need to
be extracted
this would include $action
a quick fix is to use extract at the beginning of the script
ie
extract($_POST);
would extract all post vars
extract($_GET);
would do the get vars
extract($_REQUEST);
would do get, post, cookie
you can do the individual vars
ie
$action=$_GET['action'];
read more here http://uk.php.net/manual/en/reserved.variables.php