Remove is_king.php.
Rename post_card.php to select_card.php.

Use delegate instead of onclick.
Remove get_id.php, return id from savename.php.