{"id":55,"date":"2006-05-18T18:25:36","date_gmt":"2006-05-18T23:25:36","guid":{"rendered":"\/cgi\/wp\/?p=55"},"modified":"2006-05-18T18:25:36","modified_gmt":"2006-05-18T23:25:36","slug":"php-secure-administration-scripts","status":"publish","type":"post","link":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/?p=55","title":{"rendered":"PHP Secure Administration Scripts"},"content":{"rendered":"<p>I have written some code to secure the database administration scripts I use to manage my books database. Now my simple web application has a log in page and you cannot access any other pages without a valid log in. All of the database administration pages are written in PHP and they allow me to manage a table in this web site&#8217;s MySQL database.<\/p>\n<p>I could not write my code as elegantly as I would have liked. PHP handles sessions in a peculiar fashion and I had to set the directory where it can save a file for a session. I did not like that. ASP does not use files to manage sessions. Now I have a directory that is collecting files every time I start a session. <\/p>\n<p>Also, the PHP method for doing a redirect does not work very well. It was doing the redirect regardless of the condition that my code was testing. I had to use JavaScript to change the window location. <\/p>\n<p>It works but I plan to spend some more time trying to improve the code because this is a fairly typical requirement for any web application.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have written some code to secure the database administration scripts I use to manage my books database. Now my simple web application has a log in page and you cannot access any other pages without a valid log in. &hellip; <a href=\"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/?p=55\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"_links":{"self":[{"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=\/wp\/v2\/posts\/55"}],"collection":[{"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=55"}],"version-history":[{"count":0,"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=\/wp\/v2\/posts\/55\/revisions"}],"wp:attachment":[{"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=55"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=55"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=55"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}