It's better to use wp_nonce_field() function
http://codex.wordpress.org/Function_Reference/wp_nonce_field