{"id":38,"date":"2007-07-06T21:30:48","date_gmt":"2007-07-06T16:00:48","guid":{"rendered":"http:\/\/www.bin-co.com\/blog\/2007\/07\/3-simple-steps-to-create-a-web-installer\/"},"modified":"2007-07-06T21:30:48","modified_gmt":"2007-07-06T16:00:48","slug":"3-simple-steps-to-create-a-web-installer","status":"publish","type":"post","link":"https:\/\/www.bin-co.com\/blog\/2007\/07\/3-simple-steps-to-create-a-web-installer\/","title":{"rendered":"3 Simple Steps to create a Web Installer"},"content":{"rendered":"<p class=\"intro\"><a href=\"http:\/\/www.bin-co.com\/blog\/2007\/07\/web-application-installer\/\">Creating a web installer<\/a> is not hard &#8211; as a matter of fact &#8211; it is downright easy. You just have to know a few things. <strong class=\"highlight\">Get the database details, create the database, save the details<\/strong>. That&#8217;s it!<\/p>\n<h2>Getting Database Details<\/h2>\n<p><a href='http:\/\/www.bin-co.com\/blog\/wp-content\/uploads\/2007\/07\/nexty.png' title='Nexty Installer Screenshot'><img src='http:\/\/www.bin-co.com\/blog\/wp-content\/uploads\/2007\/07\/nexty.thumbnail.png' alt='Nexty Installer Screenshot' \/><\/a><\/p>\n<p>A simple four field form will suffice. The important thing to remember is that the <strong class=\"highlight\">data must be saved as session variables<\/strong> &#8211; as we are using a multi-page form.<\/p>\n<p>As soon as you get the DB details, try to <strong class=\"highlight\">connect to the database and confirm that the DB details is correct<\/strong>. If the connection attempt fails, take the user back to the DB details form. Else go to step two.<\/p>\n<h2>Insert Initial Data<\/h2>\n<p>This part is easy &#8211; just <strong class=\"highlight\">run a bunch of SQL statements to create the necessary table structure and insert the initial data<\/strong>.<\/p>\n<h2>Save the Details<\/h2>\n<p>This should be the last step of the installation. Just take all the data from the session variables and <strong class=\"highlight\">write it to a file, say &#8216;configuration.php&#8217;<\/strong>. Write the data as PHP code &#8211; so all you have to do to retrieve the data is include the file.<\/p>\n<p>The code for the installer in the next post.<\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"mh-excerpt\"><p>Creating a web installer is not hard &#8211; as a matter of fact &#8211; it is downright easy. You just have to know a few <a class=\"mh-excerpt-more\" href=\"https:\/\/www.bin-co.com\/blog\/2007\/07\/3-simple-steps-to-create-a-web-installer\/\" title=\"3 Simple Steps to create a Web Installer\">[&#8230;]<\/a><\/p>\n<\/div>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10,25,30],"tags":[84,88,144,147,148,149,297],"class_list":["post-38","post","type-post","status-publish","format-standard","hentry","category-database","category-scripts","category-web-development","tag-configuration","tag-database","tag-iis","tag-install","tag-installation","tag-installer","tag-web"],"_links":{"self":[{"href":"https:\/\/www.bin-co.com\/blog\/wp-json\/wp\/v2\/posts\/38","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bin-co.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bin-co.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bin-co.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bin-co.com\/blog\/wp-json\/wp\/v2\/comments?post=38"}],"version-history":[{"count":0,"href":"https:\/\/www.bin-co.com\/blog\/wp-json\/wp\/v2\/posts\/38\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.bin-co.com\/blog\/wp-json\/wp\/v2\/media?parent=38"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bin-co.com\/blog\/wp-json\/wp\/v2\/categories?post=38"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bin-co.com\/blog\/wp-json\/wp\/v2\/tags?post=38"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}