Cookies and PHP and Editing DataTables

On initial load the datatable cannot be edited, but if you click the 'Get an editing privs cookie' button the page will give your browser a cookie that is checked on reload (which conveniently happens immediately). If you've got the cookie you can edit the datatable.

A less degenerate example would have the cookie setting and page display on separate pages (like a login page and an editing page), but this was a nice way to get everything into one short file.