<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	
	xmlns:georss="http://www.georss.org/georss"
	xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
	>

<channel>
	<title>php Archives - Michael Sunarlim</title>
	<atom:link href="https://sunarlim.com/tag/php/feed/" rel="self" type="application/rss+xml" />
	<link>https://sunarlim.com/tag/php/</link>
	<description>Random blurbs about web development, e-commerce and technology</description>
	<lastBuildDate>Fri, 19 Mar 2021 20:03:49 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.4.5</generator>

<image>
	<url>https://i0.wp.com/sunarlim.com/wp-content/uploads/2016/07/cropped-MS_Square_512x512.png?fit=32%2C32&#038;ssl=1</url>
	<title>php Archives - Michael Sunarlim</title>
	<link>https://sunarlim.com/tag/php/</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">30613895</site>	<item>
		<title>MailChimp Subscribe Form with PHP, jQuery and AJAX (API 3.0)</title>
		<link>https://sunarlim.com/2017/01/mailchimp-subscribe-form-php-jquery-api3/</link>
					<comments>https://sunarlim.com/2017/01/mailchimp-subscribe-form-php-jquery-api3/#comments</comments>
		
		<dc:creator><![CDATA[Michael]]></dc:creator>
		<pubDate>Mon, 09 Jan 2017 06:48:18 +0000</pubDate>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[mailchimp]]></category>
		<category><![CDATA[php]]></category>
		<guid isPermaLink="false">https://sunarlim.com/?p=2591</guid>

					<description><![CDATA[<p>By popular demand, I updated my code and posted it as new GitHub repository that utilizes newer MailChimp API 3.0. Please read the tutorial below to create AJAX based MailChimp subscribe form on your PHP website with a little jQuery knowledge. Original post using (older and no longer supported) MailChimp API 1.0 can be found here. What... <span class="more"><a class="more-link" href="https://sunarlim.com/2017/01/mailchimp-subscribe-form-php-jquery-api3/">Continue reading <span class="meta-nav">&#8594;</span></a></span></p>
<p>The post <a href="https://sunarlim.com/2017/01/mailchimp-subscribe-form-php-jquery-api3/">MailChimp Subscribe Form with PHP, jQuery and AJAX (API 3.0)</a> appeared first on <a href="https://sunarlim.com">Michael Sunarlim</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>By popular demand, I updated my code and posted it as <a href="https://github.com/sunarlim/mailchimp-subscribe-api-v3" target="_blank" rel="noopener">new GitHub repository</a> that utilizes newer MailChimp API 3.0. Please read the tutorial below to create AJAX based MailChimp subscribe form on your PHP website with a little jQuery knowledge.</p>
<p>Original post using (older and no longer supported) MailChimp API 1.0 can be found <a href="https://sunarlim.com/2014/04/mailchimp-sign-form-php-jquery-ajax/">here</a>.</p>
<h3>What this code does</h3>
<ul>
<li>Validate field contents</li>
<li>Pass the form submission to MailChimp and add the record to your list</li>
<li>Basic fallback method for very, very old browser or does not have JavaScript activated</li>
<li>Very customizable and easily expandable, depending on your requirements</li>
<li>jQuery and jQuery Validation plugin called from CDNJS to keep number of files to maintain at minimal</li>
</ul>
<p><span id="more-2591"></span></p>
<h3>Tools/Credits</h3>
<ol>
<li><a title="jQuery" href="http://jquery.com/" target="_blank" rel="noopener">jQuery</a></li>
<li><a title="jQuery Validation" href="http://jqueryvalidation.org/" target="_blank" rel="noopener">jQuery Validation Plugin</a></li>
<li><a title="MailChimp API Wrappers" href="https://github.com/drewm/mailchimp-api" target="_blank" rel="noopener">MailChimp API v3 PHP Wrapper</a></li>
</ol>
<h3>MailChimp API Key and List ID</h3>
<p>Below we start, we need to generate public API key from your MailChimp account and also identify your list ID. If you are not sure how to retrieve those, follow these links from MailChimp Knowledge Base to <a title="MailChimp - Finding or generating your API key" href="http://kb.mailchimp.com/accounts/management/about-api-keys#Finding-or-generating-your-API-key" target="_blank" rel="noopener">retrieve your account&#8217;s API key</a> and <a title="MailChimp - Find Your List ID" href="http://kb.mailchimp.com/lists/managing-subscribers/find-your-list-id" target="_blank" rel="noopener">find your list ID</a>.</p>
<h4>The Form Page (index.php)</h4>
<p>jQuery will handle the AJAX using <span class="lang:js decode:true crayon-inline">$.post</span>  method and jQuery Validation plugin will validate the field values including email address format.</p>
<p>For this example, I am including first name and last name as part of the form fields. Feel free to make adjustments as required. Although keep in mind after changing the form fields, you may also need to adjust the <span class="lang:default decode:true crayon-inline">subscribe.php</span>  file too.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="html" data-enlighter-linenumbers="false">&lt;html&gt;
&lt;head&gt;
  &lt;title&gt;MailChimp (API v3) Sign-Up Form&lt;/title&gt;
  &lt;script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.16.0/jquery.validate.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
    $(document).ready(function() {
      // jQuery Validation
      $("#signup").validate({
        // if valid, post data via AJAX
        submitHandler: function(form) {
          $.post("subscribe.php", { fname: $("#fname").val(), lname: $("#lname").val(), email: $("#email").val() }, function(data) {
            $('#response').html(data);
          });
        },
        // all fields are required
        rules: {
          fname: {
            required: true
          },
          lname: {
            required: true
          },
          email: {
            required: true,
            email: true
          }
        }
      });
    });
  &lt;/script&gt;
&lt;/head&gt;

&lt;body&gt;
  &lt;div id="wrapper"&gt;
    &lt;form id="signup" class="formee" action="subscribe.php" method="post"&gt;
      &lt;fieldset&gt;
        &lt;legend&gt;Sign Up&lt;/legend&gt;
        &lt;div&gt;
          &lt;label for="fname"&gt;First Name *&lt;/label&gt; &lt;input name="fname" id="fname" type="text" /&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;label for="lname"&gt;Last Name *&lt;/label&gt; &lt;input name="lname" id="lname" type="text" /&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;label for="email"&gt;Email Address *&lt;/label&gt; &lt;input name="email" id="email" type="text" /&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;input class="right inputnew" type="submit" title="Send" value="Send" /&gt;
        &lt;/div&gt;
      &lt;/fieldset&gt;
    &lt;/form&gt;
    &lt;div id="response"&gt;&lt;/div&gt;
  &lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<h4>Form Processor <em>(subscribe.php)</em></h4>
<p>I try to include as much comment as possible to make the code self explanatory.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="php" data-enlighter-linenumbers="false">&lt;?php

  // Put your MailChimp API and List ID hehe
  $api_key = 'ENTER_YOUR_API_KEY_HERE';
  $list_id = 'ENTER_YOUR_LIST_ID_HERE';

  // Let's start by including the MailChimp API wrapper
  include('./inc/MailChimp.php');
  // Then call/use the class
  use \DrewM\MailChimp\MailChimp;
  $MailChimp = new MailChimp($api_key);

  // Submit subscriber data to MailChimp
  // For parameters doc, refer to: http://developer.mailchimp.com/documentation/mailchimp/reference/lists/members/
  // For wrapper's doc, visit: https://github.com/drewm/mailchimp-api
  $result = $MailChimp-&gt;post("lists/$list_id/members", [
              'email_address' =&gt; $_POST["email"],
              'merge_fields'  =&gt; ['FNAME'=&gt;$_POST["fname"], 'LNAME'=&gt;$_POST["lname"]],
              'status'        =&gt; 'subscribed',
            ]);

  if ($MailChimp-&gt;success()) {
    // Success message
    echo "&lt;h4&gt;Thank you, you have been added to our mailing list.&lt;/h4&gt;";
  } else {
    // Display error
    echo $MailChimp-&gt;getLastError();
    // Alternatively you can use a generic error message like:
    // echo "&lt;h4&gt;Please try again.&lt;/h4&gt;";
  }
?&gt;</pre>
<h3>Download</h3>
<p><a href="https://github.com/sunarlim/mailchimp-subscribe-api-v3/archive/master.zip">Click here to download</a> the basic files to create MailChimp subscribe form on your website. Alternatively, you can also <a href="https://github.com/sunarlim/mailchimp-subscribe-api-v3" target="_blank" rel="noopener">visit the GitHub repository</a>.</p>
<h3>Coming Soon Templates</h3>
<p>The MailChimp subscribe form example only includes basic HTML page. If you are thinking of using it for your upcoming site, and you have limited resources to create the page design, check out my list of <a title="5 Clean and Free Coming Soon Page Templates with Email Subscription Form" href="https://sunarlim.com/2014/05/5-clean-and-free-coming-soon-page-templates/">5 Clean and Free Coming Soon Page Templates</a> and <a title="ThemeForest &gt; Site Templates &gt; Specialty Pages &gt; Under Construction" href="http://themeforest.net/category/site-templates/specialty-pages/under-construction?ref=mayksyu" target="_blank" rel="noopener">Coming Soon &amp; Under Construction Templates on ThemeForest</a>.</p>
<p>The post <a href="https://sunarlim.com/2017/01/mailchimp-subscribe-form-php-jquery-api3/">MailChimp Subscribe Form with PHP, jQuery and AJAX (API 3.0)</a> appeared first on <a href="https://sunarlim.com">Michael Sunarlim</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://sunarlim.com/2017/01/mailchimp-subscribe-form-php-jquery-api3/feed/</wfw:commentRss>
			<slash:comments>38</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">2591</post-id>	</item>
		<item>
		<title>Latest project: House of Kooser</title>
		<link>https://sunarlim.com/2015/08/latest-project-house-of-kooser/</link>
					<comments>https://sunarlim.com/2015/08/latest-project-house-of-kooser/#respond</comments>
		
		<dc:creator><![CDATA[Michael]]></dc:creator>
		<pubDate>Fri, 14 Aug 2015 05:43:15 +0000</pubDate>
				<category><![CDATA[CMS]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[kirby]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[responsive]]></category>
		<guid isPermaLink="false">https://sunarlim.com/?p=1523</guid>

					<description><![CDATA[<p>It had been a while since I worked on fully customized website without using a pre-built templates. Doing <a href="http://houseofkooser.com/" target="_blank">House of Kooser's new website</a> has been a refreshing experience. While it certainly took more time, there is this different level of satisfaction once you see up and running.</p>
<p>The post <a href="https://sunarlim.com/2015/08/latest-project-house-of-kooser/">Latest project: House of Kooser</a> appeared first on <a href="https://sunarlim.com">Michael Sunarlim</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>It had been a while since I fully worked on a customized website without using pre-built templates. Doing <a href="http://houseofkooser.com/" target="_blank">House of Kooser&#8217;s new website</a> has been a refreshing experience. While it certainly took more time, there is this different level of satisfaction once you see it up and running.</p>
<p>On top of it, the site is integrated with the always awesome <a href="http://getkirby.com/" target="_blank">Kirby CMS</a>.</p>
<p>Check it out at <a href="http://houseofkooser.com/" target="_blank">houseofkooser.com</a></p>
<p>The post <a href="https://sunarlim.com/2015/08/latest-project-house-of-kooser/">Latest project: House of Kooser</a> appeared first on <a href="https://sunarlim.com">Michael Sunarlim</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://sunarlim.com/2015/08/latest-project-house-of-kooser/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1523</post-id>	</item>
		<item>
		<title>Ready-to-use MailChimp PHP integration scripts</title>
		<link>https://sunarlim.com/2015/01/ready-use-mailchimp-php-integration-scripts/</link>
					<comments>https://sunarlim.com/2015/01/ready-use-mailchimp-php-integration-scripts/#respond</comments>
		
		<dc:creator><![CDATA[Michael]]></dc:creator>
		<pubDate>Tue, 06 Jan 2015 08:00:33 +0000</pubDate>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[mailchimp]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[plugins]]></category>
		<guid isPermaLink="false">https://sunarlim.com/?p=1336</guid>

					<description><![CDATA[<p>I have shared a simple tutorial to integrate your web page with MailChimp subscription API. It is intended to give the most basic direction and then you can expand the design and functionalities to your preference. Some of you however might prefer to use a more &#8220;plug and play&#8221; approach. Therefore I decided to list... <span class="more"><a class="more-link" href="https://sunarlim.com/2015/01/ready-use-mailchimp-php-integration-scripts/">Continue reading <span class="meta-nav">&#8594;</span></a></span></p>
<p>The post <a href="https://sunarlim.com/2015/01/ready-use-mailchimp-php-integration-scripts/">Ready-to-use MailChimp PHP integration scripts</a> appeared first on <a href="https://sunarlim.com">Michael Sunarlim</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>I have shared <a title="MailChimp Subscribe Form with PHP, jQuery and AJAX" href="https://sunarlim.com/2014/04/mailchimp-sign-form-php-jquery-ajax/">a simple tutorial to integrate your web page with MailChimp</a> subscription API. It is intended to give the most basic direction and then you can expand the design and functionalities to your preference. Some of you however might prefer to use a more &#8220;plug and play&#8221; approach. Therefore I decided to list a number of (paid) scripts that would allow you to add good looking MailChimp PHP integration with minimal time required. These are not free, but definitely worth to save hours of your productive time.</p>
<hr />
<h3><a href="http://codecanyon.net/item/doomailchimp-modal-subscribe-php-class/3826800?ref=mayksyu" target="_blank">DooMailChimp Modal Subscribe</a></h3>
<p><a href="http://codecanyon.net/item/doomailchimp-modal-subscribe-php-class/3826800?ref=mayksyu" target="_blank"><img fetchpriority="high" decoding="async" class="aligncenter size-full wp-image-1339" src="https://i0.wp.com/sunarlim.com/wp-content/uploads/2014/12/590x300.jpg?resize=590%2C300&#038;ssl=1" alt="DooMailChimp Modal Subscribe" width="590" height="300" srcset="https://i0.wp.com/sunarlim.com/wp-content/uploads/2014/12/590x300.jpg?w=590&amp;ssl=1 590w, https://i0.wp.com/sunarlim.com/wp-content/uploads/2014/12/590x300.jpg?resize=300%2C153&amp;ssl=1 300w, https://i0.wp.com/sunarlim.com/wp-content/uploads/2014/12/590x300.jpg?resize=150%2C76&amp;ssl=1 150w, https://i0.wp.com/sunarlim.com/wp-content/uploads/2014/12/590x300.jpg?resize=400%2C203&amp;ssl=1 400w, https://i0.wp.com/sunarlim.com/wp-content/uploads/2014/12/590x300.jpg?resize=200%2C102&amp;ssl=1 200w" sizes="(max-width: 590px) 100vw, 590px" data-recalc-dims="1" /></a><br />
Let&#8217;s start with the most simple but very effective approach. DooMailChimp allows you to add a simple button or link which when clicked will trigger a form modal box that connects to MailChimp upon submission.</p>
<hr />
<h3><a href="http://codecanyon.net/item/mailchimp-subscribe-form/7123150?ref=mayksyu" target="_blank">MailChimp Subscribe Form</a></h3>
<p><a href="http://codecanyon.net/item/mailchimp-subscribe-form/7123150?ref=mayksyu" target="_blank"><img decoding="async" class="aligncenter size-full wp-image-1341" src="https://i0.wp.com/sunarlim.com/wp-content/uploads/2014/12/inline_preview.jpg?resize=590%2C300&#038;ssl=1" alt="MailChimp Subscribe Form" width="590" height="300" srcset="https://i0.wp.com/sunarlim.com/wp-content/uploads/2014/12/inline_preview.jpg?w=590&amp;ssl=1 590w, https://i0.wp.com/sunarlim.com/wp-content/uploads/2014/12/inline_preview.jpg?resize=300%2C153&amp;ssl=1 300w, https://i0.wp.com/sunarlim.com/wp-content/uploads/2014/12/inline_preview.jpg?resize=150%2C76&amp;ssl=1 150w, https://i0.wp.com/sunarlim.com/wp-content/uploads/2014/12/inline_preview.jpg?resize=400%2C203&amp;ssl=1 400w, https://i0.wp.com/sunarlim.com/wp-content/uploads/2014/12/inline_preview.jpg?resize=200%2C102&amp;ssl=1 200w" sizes="(max-width: 590px) 100vw, 590px" data-recalc-dims="1" /></a><br />
Instead of using modal box, this script can be embedded using iframe so it stays on your web page. A good idea if you really want to draw more attention from your site&#8217;s visitors. The cool thing is they can sign up using Facebook, Hotmail, Google, LinkedIn aside from entering their email address manually.</p>
<hr />
<h3><a href="http://codecanyon.net/item/contact-form-generator-form-builder/1719810?ref=mayksyu" target="_blank">Contact Form Generator</a></h3>
<p><a href="http://codecanyon.net/item/contact-form-generator-form-builder/1719810?ref=mayksyu" target="_blank"><img decoding="async" class="aligncenter size-full wp-image-1344" src="https://i0.wp.com/sunarlim.com/wp-content/uploads/2014/12/590x300-cfg-17.png?resize=590%2C300&#038;ssl=1" alt="590x300-cfg-17" width="590" height="300" srcset="https://i0.wp.com/sunarlim.com/wp-content/uploads/2014/12/590x300-cfg-17.png?w=590&amp;ssl=1 590w, https://i0.wp.com/sunarlim.com/wp-content/uploads/2014/12/590x300-cfg-17.png?resize=300%2C153&amp;ssl=1 300w, https://i0.wp.com/sunarlim.com/wp-content/uploads/2014/12/590x300-cfg-17.png?resize=150%2C76&amp;ssl=1 150w, https://i0.wp.com/sunarlim.com/wp-content/uploads/2014/12/590x300-cfg-17.png?resize=400%2C203&amp;ssl=1 400w, https://i0.wp.com/sunarlim.com/wp-content/uploads/2014/12/590x300-cfg-17.png?resize=200%2C102&amp;ssl=1 200w" sizes="(max-width: 590px) 100vw, 590px" data-recalc-dims="1" /></a><br />
If you need more than a simple subscribe form but a complete contact form instead, this is a great form generator to make it a snap. With complete MailChimp and Aweber integration, you can create multiple forms on multiple projects in a breeze. You would still need to play with the styles though to really get the look that you prefer.</p>
<hr />
<h3><a href="http://codecanyon.net/item/layered-popups/6027291?ref=mayksyu" target="_blank">Layered Popups</a></h3>
<p><a href="http://codecanyon.net/item/layered-popups/6027291?ref=mayksyu" target="_blank"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1345" src="https://i0.wp.com/sunarlim.com/wp-content/uploads/2014/12/banner-1.jpg?resize=590%2C300&#038;ssl=1" alt="Layered Popups" width="590" height="300" srcset="https://i0.wp.com/sunarlim.com/wp-content/uploads/2014/12/banner-1.jpg?w=590&amp;ssl=1 590w, https://i0.wp.com/sunarlim.com/wp-content/uploads/2014/12/banner-1.jpg?resize=300%2C153&amp;ssl=1 300w, https://i0.wp.com/sunarlim.com/wp-content/uploads/2014/12/banner-1.jpg?resize=150%2C76&amp;ssl=1 150w, https://i0.wp.com/sunarlim.com/wp-content/uploads/2014/12/banner-1.jpg?resize=400%2C203&amp;ssl=1 400w, https://i0.wp.com/sunarlim.com/wp-content/uploads/2014/12/banner-1.jpg?resize=200%2C102&amp;ssl=1 200w" sizes="(max-width: 590px) 100vw, 590px" data-recalc-dims="1" /></a><br />
Another way, and probably the most effective, to collect your visitors&#8217; email addresses is by incorporating automatic popup. This script will do that for you with integration with almost every popular email service such as MailChimp, GetResponse, iContact, Campaign Monitor, AWeber, Mad Mimi, Benchmark, ActiveCampaign, Interspire and Sendy.</p>
<hr />
<p>Remember, getting new subscribers is only the first step. It is more important to actually send them engaging emails and make them happy with their decision to sign up in the first place.</p>
<p>The post <a href="https://sunarlim.com/2015/01/ready-use-mailchimp-php-integration-scripts/">Ready-to-use MailChimp PHP integration scripts</a> appeared first on <a href="https://sunarlim.com">Michael Sunarlim</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://sunarlim.com/2015/01/ready-use-mailchimp-php-integration-scripts/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1336</post-id>	</item>
		<item>
		<title>When to Use Flat-File CMS?</title>
		<link>https://sunarlim.com/2014/05/use-flat-file-cms/</link>
					<comments>https://sunarlim.com/2014/05/use-flat-file-cms/#respond</comments>
		
		<dc:creator><![CDATA[Michael]]></dc:creator>
		<pubDate>Wed, 07 May 2014 02:53:05 +0000</pubDate>
				<category><![CDATA[CMS]]></category>
		<category><![CDATA[php]]></category>
		<guid isPermaLink="false">https://sunarlim.com/?p=1027</guid>

					<description><![CDATA[<p>I have written simple comparison of Flat File CMS. Last year I also wrote about choosing ProcessWire over WordPress, while at the same time I still use WordPress to power my blog. Obviously I do not like to stick with one CMS for all of my projects. I believe you need to understand the scope... <span class="more"><a class="more-link" href="https://sunarlim.com/2014/05/use-flat-file-cms/">Continue reading <span class="meta-nav">&#8594;</span></a></span></p>
<p>The post <a href="https://sunarlim.com/2014/05/use-flat-file-cms/">When to Use Flat-File CMS?</a> appeared first on <a href="https://sunarlim.com">Michael Sunarlim</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>I have written simple comparison of <a href="https://sunarlim.com/2014/03/flat-file-cms-comparison/" title="Flat File CMS Comparison">Flat File CMS</a>. Last year I also wrote about <a href="https://sunarlim.com/2013/02/why-choose-processwire-over-wordpress/" title="Why choose ProcessWire over WordPress?">choosing ProcessWire over WordPress</a>, while at the same time I still use WordPress to power my blog. Obviously I do not like to stick with one CMS for all of my projects. I believe you need to understand the scope of a project and requirements to be able to select the best system to give the best result for your client&#8217;s satisfaction and yourself.<br />
<span id="more-1027"></span></p>
<p>Below are my thoughts of when to consider of using flat-file based CMS.</p>
<h3>Simple website</h3>
<p>The website you are building has simple layout with mostly text content. No image gallery, advanced search function, exclusive content, etc. Generally, you do not want to spend half of the development time only to initially set the basic configurations of (more advanced) DB-based CMS.</p>
<h3>You or your client is not expecting to keep on expanding the site&#8217;s functionality</h3>
<p>This is always a hard call as you cannot really tell. One of the great advantage for using WordPress, ProcessWire, or even custom develop your CMS using a framework like CodeIgniter is the abundance list of plugins and extensions. As flat-file CMS is a relatively new trend, the supporting community is still growing and may take longer for a plugin to some popular service to be available for easy integration.</p>
<h3>You are working on different servers and need the content to be consistent</h3>
<p>Everyone has experienced this no doubt. You work on WordPress-based site on your local server, upload it to staging server to preview, made some content changes based on client&#8217;s feedback and frustrated in how to synced it back without having to modify the configuration settings. This becomes easier with flat-file CMS as you can copy the content files over FTP. Better yet, you can set up a repository and have all changes automatically synced.</p>
<h3>The user only wants to manage content</h3>
<p>Most advanced CMS has become so advanced, its interface becomes more complex and has longer learning curve to use. It is easy for non-tech users to mess with the settings. If the flat-file CMS has an UI, mostly it is only focused to manage the content and minimize the possibility of messing the config.</p>
<h3>Your user knows FTP, but not MySQL</h3>
<p>Trust me, more end users are familiar with FTP and you realized before. Sometimes they want to be able to login to their FTP and download its content for backup. In case of catastrophe, they will have the security that they can just upload everything and have the website back to operations.</p>
<h3>You initially do not need a CMS</h3>
<p>Last but not least, it might be good to integrate your static site with flat-file CMS. You may not plan to update it that often and you know HTML very well, but it is always nice to have a more human-friendly format. If this is a client&#8217;s site and not a requirement, they will be happy to be given this &#8220;bonus&#8221; just by spending an extra couple of hours.</p>
<p>For bottom note, I do not mean to highlight issues of DB-based CMS. They have been serving their purposes wonderfully. As a web developer, it is good to have more options available than ever to select a CMS that serves your specifications best.</p>
<p>The post <a href="https://sunarlim.com/2014/05/use-flat-file-cms/">When to Use Flat-File CMS?</a> appeared first on <a href="https://sunarlim.com">Michael Sunarlim</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://sunarlim.com/2014/05/use-flat-file-cms/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1027</post-id>	</item>
		<item>
		<title>MailChimp Subscribe Form with PHP, jQuery and AJAX</title>
		<link>https://sunarlim.com/2014/04/mailchimp-sign-form-php-jquery-ajax/</link>
					<comments>https://sunarlim.com/2014/04/mailchimp-sign-form-php-jquery-ajax/#comments</comments>
		
		<dc:creator><![CDATA[Michael]]></dc:creator>
		<pubDate>Mon, 28 Apr 2014 10:18:26 +0000</pubDate>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[mailchimp]]></category>
		<category><![CDATA[php]]></category>
		<guid isPermaLink="false">https://sunarlim.com/?p=1008</guid>

					<description><![CDATA[<p>I am pretty sure I have mentioned somewhere in this blog or tweets of how I love MailChimp or and would recommend it for any business wanting to untap their email marketing potential. You can start with zero investment and only start paying when you are completely confident it is very worthy. MailChimp provides a... <span class="more"><a class="more-link" href="https://sunarlim.com/2014/04/mailchimp-sign-form-php-jquery-ajax/">Continue reading <span class="meta-nav">&#8594;</span></a></span></p>
<p>The post <a href="https://sunarlim.com/2014/04/mailchimp-sign-form-php-jquery-ajax/">MailChimp Subscribe Form with PHP, jQuery and AJAX</a> appeared first on <a href="https://sunarlim.com">Michael Sunarlim</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>I am pretty sure I have mentioned somewhere in this blog or tweets of how I love <strong><a title="MailChimp" href="http://mailchimp.com" target="_blank" rel="noopener">MailChimp</a></strong> or and would recommend it for any business wanting to untap their email marketing potential. You can start with zero investment and only start paying when you are completely confident it is very worthy.</p>
<p>MailChimp provides a good tool to generate your custom sign up form which will serve most requirements well. Some customers however, want a fully custom form or integrate it with existing template they already own. Today I am going to share a quick tutorial in how to integrate HTML form with MailChimp API using PHP and jQuery.</p>
<h3>MailChimp Subscribe Form Features</h3>
<p>What will it do?</p>
<ul>
<li>Validate field contents</li>
<li>Pass the form submission to MailChimp and add the record to your list</li>
<li>Basic fallback method for very, very old browser that does not have JavaScript activated</li>
<li>Five minutes setup</li>
</ul>
<p><span id="more-1008"></span></p>
<h3>Tools/Credits</h3>
<ol>
<li><a title="jQuery" href="http://jquery.com/" target="_blank" rel="noopener">jQuery</a></li>
<li><a title="jQuery Validation" href="http://jqueryvalidation.org/" target="_blank" rel="noopener">jQuery Validation Plugin</a></li>
<li><a title="MailChimp API Wrappers" href="http://apidocs.mailchimp.com/api/downloads/#php" target="_blank" rel="noopener">MailChimp PHP API Class</a></li>
</ol>
<h3>The Form Page <em>(index.php)</em></h3>
<p>jQuery will handle the AJAX using <code>$.post</code> method and jQuery Validation plugin will validate the field values including email address format.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="html" data-enlighter-linenumbers="false">&lt;html&gt;
&lt;head&gt;
  &lt;title&gt;MailChimp Sign-Up Form&lt;/title&gt;
  &lt;script type="text/javascript" src="js/jquery-1.11.0.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="js/jquery.validate.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
    $(document).ready(function() {
      // jQuery Validation
      $("#signup").validate({
        // if valid, post data via AJAX
        submitHandler: function(form) {
          $.post("subscribe.php", { fname: $("#fname").val(), lname: $("#lname").val(), email: $("#email").val() }, function(data) {
            $('#response').html(data);
          });
        },
        // all fields are required
        rules: {
          fname: {
            required: true
          },
          lname: {
            required: true
          },
          email: {
            required: true,
            email: true
          }
        }
      });
    });
  &lt;/script&gt;
&lt;/head&gt;

&lt;body&gt;
  &lt;div id="wrapper"&gt;
    &lt;form id="signup" class="formee" action="subscribe.php" method="post"&gt;
      &lt;fieldset&gt;
        &lt;legend&gt;Sign Up&lt;/legend&gt;
        &lt;div&gt;
          &lt;label for="fname"&gt;First Name *&lt;/label&gt; &lt;input name="fname" id="fname" type="text" /&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;label for="lname"&gt;Last Name *&lt;/label&gt; &lt;input name="lname" id="lname" type="text" /&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;label for="email"&gt;Email Address *&lt;/label&gt; &lt;input name="email" id="email" type="text" /&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;input class="right inputnew" type="submit" title="Send" value="Send" /&gt;
        &lt;/div&gt;
      &lt;/fieldset&gt;
    &lt;/form&gt;
    &lt;div id="response"&gt;&lt;/div&gt;
  &lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<h3>Form Processor <em>(subscribe.php)</em></h3>
<p>Our form will connect to MailChimp with the help of <code>MCAPI.class.php</code>. Please make sure you have generated the API key of your account and copied your list ID. MailChimp&#8217;s excellent knowledge base provides the instructions in <a title="MailChimp - Finding or generating your API key" href="http://kb.mailchimp.com/accounts/management/about-api-keys#Finding-or-generating-your-API-key" target="_blank" rel="noopener">how to retrieve your account&#8217;s API key</a> and <a title="MailChimp - Find Your List ID" href="http://kb.mailchimp.com/lists/managing-subscribers/find-your-list-id" target="_blank" rel="noopener">find your list ID</a>.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="php" data-enlighter-linenumbers="false">&lt;?php
  require_once 'inc/MCAPI.class.php';
  $api = new MCAPI('ENTER_YOUR_API_KEY_HERE');
  $merge_vars = array('FNAME'=&gt;$_POST["fname"], 'LNAME'=&gt;$_POST["lname"]);

  // Submit subscriber data to MailChimp
  // For parameters doc, refer to: http://apidocs.mailchimp.com/api/1.3/listsubscribe.func.php
  $retval = $api-&gt;listSubscribe( 'ENTER_YOUR_LIST_ID_HERE', $_POST["email"], $merge_vars, 'html', false, true );

  if ($api-&gt;errorCode){
    echo "&lt;h4&gt;Please try again.&lt;/h4&gt;";
  } else {
    echo "&lt;h4&gt;Thank you, you have been added to our mailing list.&lt;/h4&gt;";
  }
?&gt;</pre>
<p>That&#8217;s it! You can now check on your web server with a few tests and see if they are captured in your MailChimp list.</p>
<h3>Download</h3>
<p>Sample files and structure of this tutorial can be <a title="Tutorial Sample Files" href="https://github.com/sunarlim/mailchimp-subscribe/archive/master.zip">downloaded here</a>. Please share this post if you find it useful using social media buttons below.</p>
<h3>Coming Soon Templates</h3>
<p>My files only include a basic HTML page. If you are thinking of using it for your upcoming site, and you have limited resources to create the page design, check out my list of <a title="5 Clean and Free Coming Soon Page Templates with Email Subscription Form" href="https://sunarlim.com/2014/05/5-clean-and-free-coming-soon-page-templates/">5 Clean and Free Coming Soon Page Templates</a> and <a title="ThemeForest &gt; Site Templates &gt; Specialty Pages &gt; Under Construction" href="http://themeforest.net/category/site-templates/specialty-pages/under-construction?ref=mayksyu" target="_blank" rel="noopener">Coming Soon &amp; Under Construction Templates on ThemeForest</a>.</p>
<hr />
<h2>UPDATE (January 9, 2017)</h2>
<p>I have published updated version of this tutorial to make use of MailChimp&#8217;s newer API 3.0. Please follow the link to read how to create <strong><a href="https://sunarlim.com/2017/01/mailchimp-subscribe-form-php-jquery-api3/">MailChimp Subscribe Form with PHP, jQuery and AJAX (API 3.0)</a></strong>.</p>
<p>The post <a href="https://sunarlim.com/2014/04/mailchimp-sign-form-php-jquery-ajax/">MailChimp Subscribe Form with PHP, jQuery and AJAX</a> appeared first on <a href="https://sunarlim.com">Michael Sunarlim</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://sunarlim.com/2014/04/mailchimp-sign-form-php-jquery-ajax/feed/</wfw:commentRss>
			<slash:comments>127</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1008</post-id>	</item>
		<item>
		<title>Flat File CMS Comparison</title>
		<link>https://sunarlim.com/2014/03/flat-file-cms-comparison/</link>
					<comments>https://sunarlim.com/2014/03/flat-file-cms-comparison/#comments</comments>
		
		<dc:creator><![CDATA[Michael]]></dc:creator>
		<pubDate>Fri, 07 Mar 2014 10:09:39 +0000</pubDate>
				<category><![CDATA[CMS]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[php]]></category>
		<guid isPermaLink="false">https://sunarlim.com/?p=953</guid>

					<description><![CDATA[<p>Some developers claim 2014 will be the year of Flat File (or Non-Database) CMS. Personally I do not believe it will replace database-powered CMS anytime soon. To me they have different target users and main functions. If you are comparing of building a custom CMS vs using one of these CMS then it makes sense,... <span class="more"><a class="more-link" href="https://sunarlim.com/2014/03/flat-file-cms-comparison/">Continue reading <span class="meta-nav">&#8594;</span></a></span></p>
<p>The post <a href="https://sunarlim.com/2014/03/flat-file-cms-comparison/">Flat File CMS Comparison</a> appeared first on <a href="https://sunarlim.com">Michael Sunarlim</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Some developers claim 2014 will be the year of Flat File (or Non-Database) CMS. Personally I do not believe it will replace database-powered CMS anytime soon. To me they have different target users and main functions. If you are comparing of building a custom CMS vs using one of these CMS then it makes sense, but it will not replace WordPress, or Drupal, even though it always surprises me that many people still like using Joomla.</p>
<h3>What is flat file CMS?</h3>
<p>In very short sentence, as the phrase implies: CMS that queries its data from a text file instead of database like MySQL. Typically, flat-file CMS also has leaner structure compared to sometimes bloated fully-featured CMS. This allows you to focus the customization on the content management, instead of features that are not absolutely needed just because other sites have them.</p>
<h3>Advantages</h3>
<ul>
<li>Installation can be done only with an FTP access</li>
<li>Easier to sync content when developing between development/local and production servers</li>
<li>Fast, because no queries involved</li>
<li>Lightweight, smaller total size</li>
<li>One less password to create or remember (your DB)</li>
</ul>
<p>Flat file CMS is not a new thing. There are dozens of options out there for you to choose. I have hand-picked few that I like most and compare them. Hopefully by sharing this, it will help you in deciding which that would work best for your projects.</p>
<table width="100%">
<tbody>
<tr>
<th width="15%"></th>
<th width="17%"><a href="http://statamic.com/" target="_blank">Statamic</a></th>
<th width="17%"><a href="http://getkirby.com/" target="_blank">Kirby</a></th>
<th width="17%"><a href="http://monstra.org/" target="_blank">Monstra</a></th>
<th width="17%"><a href="http://picocms.org/" target="_blank">Pico</a></th>
<th width="17%"><a href="http://www.pulsecms.com/" target="_blank">Pulse</a></th>
</tr>
<tr>
<td><strong>Web server requirement</strong></td>
<td align="center">PHP 5.3.6+</td>
<td align="center">PHP 5.3+</td>
<td align="center">PHP 5.2.3+</td>
<td align="center">PHP 5.2.4+</td>
<td align="center">PHP 5.3+</td>
</tr>
<tr>
<td><strong>GUI editor</strong></td>
<td align="center">YES</td>
<td align="center">YES,<br />
as separate module</td>
<td align="center">YES</td>
<td align="center">NO</td>
<td align="center">YES</td>
</tr>
<tr>
<td><strong>Native content syntax</strong></td>
<td align="center">Markdown, Textile, HTML</td>
<td align="center">Markdown</td>
<td align="center">HTML</td>
<td align="center">Markdown</td>
<td align="center">HTML or Markdown</td>
</tr>
<tr>
<td><strong>Open Source</strong></td>
<td align="center">NO</td>
<td align="center">NO</td>
<td align="center">YES (GNU general public license)</td>
<td align="center">YES (MIT licence)</td>
<td align="center">NO</td>
</tr>
<tr>
<td><strong>Number of available add-ons/plugins*</strong></td>
<td align="center">~25</td>
<td align="center">~68</td>
<td align="center">~25</td>
<td align="center">~12</td>
<td align="center">~6</td>
</tr>
<tr>
<td><strong>Templating engine</strong></td>
<td align="center">&#8211;</td>
<td align="center">&#8211;</td>
<td align="center">&#8211;</td>
<td align="center">Twig</td>
<td align="center">&#8211;</td>
</tr>
<tr>
<td><strong>Support</strong></td>
<td align="center">Forums, Tickets</td>
<td align="center">Forums, Direct Email</td>
<td align="center">Forums, Bugtracker (GitHub)</td>
<td align="center">Bugtracker (GitHub)</td>
<td align="center">Forums, Tickets</td>
</tr>
<tr>
<td><strong>License per website</strong></td>
<td align="center">$29 for personal<br />
$99 for commercial</td>
<td align="center">$19 for personal<br />
$99 for commercial</td>
<td align="center">FREE</td>
<td align="center">FREE</td>
<td align="center">$29</td>
</tr>
</tbody>
</table>
<p><small>* as of January 2016, based on list available on developer&#8217;s website</small></p>
<h3>Which CMS to choose?</h3>
<p>Personally I want to get an opportunity to put my hands on <a href="http://statamic.com/" target="_blank">Statamic</a>. It is the most expensive, $99 for one commercial website, but it has very simple and nice control panel which is very important. For developers who do not need a control panel, <a href="http://picocms.org/" target="_blank">Pico</a> is a very interesting option.</p>
<hr />
<p><strong>Update May 15, 2014:</strong><br />
I contacted Statamic Team to consult about licensing for a tiny project I was developing. I have not received a reply to this day. I ended up giving <a href="http://getkirby.com/" target="_blank">Kirby</a> a try because it offered to download the code freely for trial. So far I am liking it and since the license costs less than half of Statamic&#8217;s, it is becoming a favorable selection for future projects.</p>
<p><strong>Update October 8, 2014:</strong><br />
With the release of Kirby 2, the team also offer a new pricing model: $19 for Personal license (non-commercial site) and $99 for Pro licence (commercial site). This puts it very similar to the pricing from Statamic. It will be interesting to see which one will be more popular in the near future.</p>
<p><strong>Update January 1, 2016:</strong><br />
Added <a href="http://www.pulsecms.com/" target="_blank">PulseCMS</a> into comparison table.</p>
<p>The post <a href="https://sunarlim.com/2014/03/flat-file-cms-comparison/">Flat File CMS Comparison</a> appeared first on <a href="https://sunarlim.com">Michael Sunarlim</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://sunarlim.com/2014/03/flat-file-cms-comparison/feed/</wfw:commentRss>
			<slash:comments>42</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">953</post-id>	</item>
		<item>
		<title>Why choose ProcessWire over WordPress?</title>
		<link>https://sunarlim.com/2013/02/why-choose-processwire-over-wordpress/</link>
					<comments>https://sunarlim.com/2013/02/why-choose-processwire-over-wordpress/#comments</comments>
		
		<dc:creator><![CDATA[Michael]]></dc:creator>
		<pubDate>Sat, 02 Feb 2013 11:22:41 +0000</pubDate>
				<category><![CDATA[CMS]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[processwire]]></category>
		<guid isPermaLink="false">https://sunarlim.com/?p=482</guid>

					<description><![CDATA[<p>Let&#8217;s admit it, WordPress is the most popular blogging platform ever. I use it to power this blog. Aside from security issues, which always haunt any popular system/app/platform, there are very few reasons not to love it. It is actively maintained, supported by huge and dedicated community, great UI, and the list goes on and... <span class="more"><a class="more-link" href="https://sunarlim.com/2013/02/why-choose-processwire-over-wordpress/">Continue reading <span class="meta-nav">&#8594;</span></a></span></p>
<p>The post <a href="https://sunarlim.com/2013/02/why-choose-processwire-over-wordpress/">Why choose ProcessWire over WordPress?</a> appeared first on <a href="https://sunarlim.com">Michael Sunarlim</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Let&#8217;s admit it, <a href="http://www.wordpress.org" target="_blank">WordPress</a> is the most popular blogging platform ever. I use it to power this blog. Aside from security issues, which always haunt any popular system/app/platform, there are very few reasons not to love it. It is actively maintained, supported by huge and dedicated community, great UI, and the list goes on and on.</p>
<p>When it comes to using it as CMS though, I always struggle to justify it as the way to go. Despite its evolution in complying the demand, it is still far from perfect. In more than one occasion, client would come to me with very specific request to use WordPress to manage their website. If the website needs to come with a blog, then yes it is a good option, but sometimes it is only a company, personal or product profile which content needs to be manageable from CMS.</p>
<p>For years, I had been trying to find the right platform/framework with just enough features and functions to allow me to build a website without having to take more time on integrating it with the CMS. Then I found <a href="http://www.processwire.com" target="_blank">ProcessWire</a>. Learning about for ProcessWire works was not the easiest, but all the time used has been very well paid off after a couple of projects built using it.</p>
<p>What makes ProcessWire a better CMS than WordPress? For starter, you can define your own fields to be used throughout the system. No plugins or custom functions required, which have always been a real turn off for me. I can list all the goods and bads between these platforms, but in short with ProcessWire you can set it up to go with your site&#8217;s structure, while with WordPress I feel it is more about adjusting your site to fit as a template.</p>
<p><span id="more-482"></span></p>
<p>So, why should you use it?</p>
<ol>
<li><span style="line-height: 13px;">You prefer to build your own CMS but also knows the pain in making one</span></li>
<li>You hate the idea of installing half a dozen plugins to create that simple customization</li>
<li>You are not that good in making custom functions in WordPress</li>
<li>You prefer not to have all the long navigation items on the left side of the admin panel</li>
<li>You want to it to be super easy to change the template of the admin</li>
<li>You need to manipulate lots of images and they have to be easy to manage</li>
<li>You want to make sure the user will enter the right input into the fields</li>
<li>You do not need to change the front-end template (theme) that often or ever; update: I was referring to WordPress&#8217; manage theme functions which is very rarely used</li>
<li>You like to explore new platforms</li>
<li>You have worked on a PHP framework and love it</li>
</ol>
<p>No platform is perfect by all means, and I am pretty sure ProcessWire is not the only one that was built on the idea to make as flexible CMS as possible. But for me it is the first one that really clicked, and it is free! So, kudos to <a href="https://twitter.com/rc_d" target="_blank">Ryan Cramer</a> and thank you for building and constantly improving this great platform.</p>
<p>The post <a href="https://sunarlim.com/2013/02/why-choose-processwire-over-wordpress/">Why choose ProcessWire over WordPress?</a> appeared first on <a href="https://sunarlim.com">Michael Sunarlim</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://sunarlim.com/2013/02/why-choose-processwire-over-wordpress/feed/</wfw:commentRss>
			<slash:comments>9</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">482</post-id>	</item>
	</channel>
</rss>
