<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Wed, 23 May 2012 05:11:53 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[NetTuts.com: Easy Form Generation Using FuelPHP]]></title>
      <guid>http://www.phpdeveloper.org/news/17672</guid>
      <link>http://www.phpdeveloper.org/news/17672</link>
      <description><![CDATA[<p>
On the NetTuts.com site today there's a new tutorial from <i>Sahan Lakshitha</i> about <a href="http://net.tutsplus.com/tutorials/php/easy-form-generation-using-fuelphp/">creating forms in FuelPHP</a>, the PHP 5.3-centric framework.
</p>
<blockquote>
Thanks to <a href="http://fuelphp.com/">FuelPHP</a>'s <a href="http://docs.fuelphp.com/classes/fieldset.html">fieldset</a> class, working with forms couldn't be easier. With a few lines of code, you can easily generate and validate a form. Today, we're going to learn how to do just that!
</blockquote>
<p>
He starts with guiding you through a simple install of the FuelPHP framework and configuring it to connect to a MySQL database. He shows how to set up a model, specify its properties and creating a controller to handle the user interaction. Using the definitions in the model, FuelPHP can automatically generate a form, complete with default options and some validation on the field (things like "required", "valid_url" and "max_length"). There's also code included showing how to edit current posts and listing out the complete post list.
</p>]]></description>
      <pubDate>Wed, 14 Mar 2012 10:05:17 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: Form Validation with PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/17660</guid>
      <link>http://www.phpdeveloper.org/news/17660</link>
      <description><![CDATA[<p>
On PHPMaster.com today there's a new tutorial showing how to <a href="http://phpmaster.com/form-validation-with-php/">do some form validation</a> using some basic PHP (no external libraries or tools here). This is a beginner level tutorial to help you get familiar with the concepts behind doing validation (and 
</p>
<blockquote>
In this article you'll construct and validate a simple form using HTML and PHP. The form is created using HTML and validation and processing of the form's contents is done with PHP. The goal is to teach you some basic HTML form elements and how their data is accessible to you in your PHP scripts.
</blockquote>
<p>
They start with the form itself, a basic setup with various kinds of fields - text, select, radio and a checkbox. Both the HTML markup and the PHP to do the validation is included. They check for things like "not empty", "must select one" and optional fields. Be sure to read <a href="http://phpmaster.com/form-validation-with-php/#comments">the comments</a> for some good tips on filtering the form's input too.
</p>]]></description>
      <pubDate>Mon, 12 Mar 2012 12:17:03 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Web Mozarts: Symfony2 Form Architecture]]></title>
      <guid>http://www.phpdeveloper.org/news/17639</guid>
      <link>http://www.phpdeveloper.org/news/17639</link>
      <description><![CDATA[<p>
In <a href="http://webmozarts.com/2012/03/06/symfony2-form-architecture/">this new post</a> to the Web Mozarts site, <i>Bernhard</i> talks about the architecture behind the current Symfony2 forms implementation and how it handles the requests your forms make.
</p>
<blockquote>
<a href="http://symfony.com/">Symfony2</a> features a brand-new <a href="https://github.com/symfony/Form">Form component</a> that, to my knowledge, supersedes most existing PHP form libraries in functionality and extensibility (not counting the still lacking, native JavaScript support). [...] The purpose of this post is to demonstrate that the Symfony2 Form component is perfectly suited for this requirement. Symfony2-specific functionality can be unplugged, leaving only the raw core dealing with form processing and abstraction.
</blockquote>
<p>
The post is broken up into several different sections, each detailing a different aspect of this Forms functionality:
</p>
<ul>
<li>It's influences from other frameworks
<li>Key aspects it provides
<li>Abstraction (reusable code)
<li>Extensibility
<li>Compositionality
<li>Separation of Concerns
<li>Model Binding
<li>Dynamic Behavior
</ul>
<p>
Both a <a href="http://webmozarts.com/wp-content/uploads/2012/03/high-level-architecture.png">high-level architecture</a> and <a href="http://webmozarts.com/wp-content/uploads/2012/03/class-diagram2.png">low-level architecture</a> are provided, showing you the internal flow behind the form handling. You can find out more about this component <a href="http://symfony.com/doc/current/book/forms.html">in the Symfony manual</a> or peek into <a href="https://github.com/symfony/Form">the code on github</a>.
</p>]]></description>
      <pubDate>Wed, 07 Mar 2012 11:13:31 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: WordPress Plugin Development]]></title>
      <guid>http://www.phpdeveloper.org/news/17561</guid>
      <link>http://www.phpdeveloper.org/news/17561</link>
      <description><![CDATA[<p>
On PHPMaster.com today there's a new tutorial showing how you can <a href="http://phpmaster.com/wordpress-plugin-development/">create a custom WordPress plugin</a> for the popular PHP-based blogging/CMS tool.
</p>
<blockquote>
If you've ever used WordPress to build a site quickly, chances are you've used one of the many plugins that are offered to extend the functionality of this popular blogging software. Plugins are one of the many things that make WordPress so attractive. [...] There are times, however, when you can't quite find what you need from existing plugins. This article will show you how to create your own WordPress plugins by walking you through an example to display some text using a widget in a the sidebar.
</blockquote>
<p>
He walks you through all of the steps you'll need to create the plugin - making the main plugin file (definition) and using some of the methods available to create the functionality: update, form, widget and the constructor to set it all up.
</p>]]></description>
      <pubDate>Mon, 20 Feb 2012 10:50:39 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Henrik Bj&oslash;rnskov's Blog: Symfony2: Using the validator symfony1 style]]></title>
      <guid>http://www.phpdeveloper.org/news/17495</guid>
      <link>http://www.phpdeveloper.org/news/17495</link>
      <description><![CDATA[<p>
In <a href="http://henrik.bjrnskov.dk/symfony2-using-the-validator-symfony1-style/">this quick new post</a> to his blog <i>Henrik Bj&oslash;rnskov</i> shows how to use the validators in <a href="http://symfony.com">Symfony2</a> in a more traditional Symfony 1 style for a form.
</p>
<blockquote>
Two of the more complicated components in Symfony2 is the Form and Validator component. The Validator is created in such a way it "always" need an Domain Object with Constraints associated through metadata. This is <a href="http://symfony.com/doc/2.0/book/validation.html">explained in detail here</a>. But there is another way. A way that resemble's the symfony1 forms. Where you could specify the validations directly in your form class.
</blockquote>
<p>
Code is included in the post to show how to load in a few of the validators (like NotBlank, Email and Choice) and how to use them in the settings defined in the "getDefaultOptions" method. 
</p>]]></description>
      <pubDate>Fri, 03 Feb 2012 11:15:01 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Script-Tutorials.com: Form Validation with Javascript and PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/17486</guid>
      <link>http://www.phpdeveloper.org/news/17486</link>
      <description><![CDATA[<p>
On the Script-Tutorials.com site today there's a <a href="http://www.script-tutorials.com/form-validation-with-javascript-and-php/">new tutorial about form validation</a> using a combination of jQuery on the frontend and PHP on the backend.
</p>
<blockquote>
In this tutorial, I will show you how to create an attractive, pleasant to look form for your website and then I will explain you how to dynamically validate them using Javascript. We'll also cover server-side validation with PHP to make everything 100% safe. This tutorial will help you to add more functionality to your forms which leads to better user experience and better quality of your website.
</blockquote>
<p>
His sample form (name, password, email and gender) is made from some pretty simple HTML markup. The real trick comes with the jQuery validation on each field handled in an onKeyUp. Included are both a "password strength" method and an email validation method to check the format of the address. Errored fields have their background color changed to indicate that they've failed and some basic validation (length, password match, etc.) are also included. The PHP does much of the same validation once the form is posted and returns any error messages that might have come up.
</p>
<p>
You can <a href="http://www.script-tutorials.com/demos/228/source.zip">download the code</a> or try out a <a href="http://www.script-tutorials.com/demos/228/index.php">live demo</a> to see the scripts together in action.
</p>]]></description>
      <pubDate>Thu, 02 Feb 2012 09:07:40 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Henrik Bj&oslash;rnskov's Blog: Symfony2: Add Cross Site Request Forgery protection to login forms]]></title>
      <guid>http://www.phpdeveloper.org/news/17326</guid>
      <link>http://www.phpdeveloper.org/news/17326</link>
      <description><![CDATA[<p>
In a new post to his blog <i>Henrik Bj&oslash;rnskov</i> has a tip on <a href="http://henrik.bjrnskov.dk/symfony2-cross-site-request-forgery/">preventing cross-site request forgeries</a> in your Symfony2 forms with the help of a simple Symfony2 configuration setting.
</p>
<blockquote>
When talking with <a href="http://twitter.com/jmikola">@jmikola</a> on #Symfony-dev this afternoon we got into the subject of cross site request forgery and symfony2 login forms. And it seems that form-login already supports this but neither of us knew how it worked. So here is another quick tip. This time about securing you login form from cross site attacks.
</blockquote>
<p>
The key is to define a "csrf_provider" in your security.yml config file and point it to the "form.csrf_provider" provider. He also includes the controller and view code/templating you'll need to get the token included in the form (and validated).
</p>]]></description>
      <pubDate>Fri, 30 Dec 2011 10:28:42 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Henrik Bj&oslashrnskov's Blog: Symfony2: How to do a Wizard (multistep form) with Doctrine2]]></title>
      <guid>http://www.phpdeveloper.org/news/17080</guid>
      <link>http://www.phpdeveloper.org/news/17080</link>
      <description><![CDATA[<p>
<i>Henrik Bj&oslashrnskov</i> has a new post with a technique you can use to combine Symfony2 and Doctrine2 to create a <a href="http://henrik.bjrnskov.dk/symfony2-wizard-doctrine/">multi-step form</a> (a wizard) without having to worry about lost user information between steps.
</p>
<blockquote>
The easy ways is doing it with Javascript and just show/hide the correct fieldsets when needed. The downside with this approach is that the data is only saved and validated once at the end. So if the user reloads the page the entered information is gone. The other way is to have every Step in the Wizard being a seperate form and validate the data based on what step you are on and save the necessary fields.
</blockquote>
<p>
For his method, he created a Manager class with a StepInterface that returns the correct field names, forms and template information to render. The interface code is included in the post as well as an example of it in use setting up the wizard object, making a report and getting the correct step information from the wizard.
</p>]]></description>
      <pubDate>Thu, 03 Nov 2011 09:13:51 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[ZetCode.com: SQLite PHP tutorial]]></title>
      <guid>http://www.phpdeveloper.org/news/17001</guid>
      <link>http://www.phpdeveloper.org/news/17001</link>
      <description><![CDATA[<p>
If you're in the process of prototyping a site or just need a lightweight storage tool for your application, you might look into <a href="http://www.sqlite.org/">SQLite</a>. Fortunately, PHP has direct support for it and <a href="http://zetcode.com/databases/sqlitephptutorial/">this great tutorial</a> from ZetCode.com will introduce you to some of the basic concepts you'll need to get working (it's a bit older, but still very useful).
</p>
<blockquote>
This is a PHP programming tutorial for the SQLite database. It covers the basics of SQLite programming with PHP language. There are two ways to code PHP scripts with SQLite library. We can use procedural functions or OOP objects and methods. In this tutorial, we use the classical procedural style. You might also want to check the <a href="http://zetcode.com/language/phptutorial/">PHP tutorial</a> or <a href="http://zetcode.com/databases/sqlitetutorial/">SQLite tutorial</a> on ZetCode.
</blockquote>
<p>
They go through the basic installation (on a linux platform, but easily adapted to others) including changes to your php.ini and the creation and use of a first sample database. You'll find the interface very similar to some of its other RDBMS cousins with a few exceptions. They show you the CRUD basics - creating records, reading the contents of a table, updating data already there and deleting records. There's also a simple form tutorial that takes a name and gender and does the inserts. 
</p>]]></description>
      <pubDate>Mon, 17 Oct 2011 12:12:48 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[WebInOne.net: Date validation for CodeIgniter 2]]></title>
      <guid>http://www.phpdeveloper.org/news/16966</guid>
      <link>http://www.phpdeveloper.org/news/16966</link>
      <description><![CDATA[<p>
On the WebInOne blog there's a post about doing some <a href="http://www.webinone.net/code-snippet/date-validation-for-codeigniter-2/">date validation in CodeIgniter 2</a> forms using the "set_validation" method.
</p>
<blockquote>
I wrote a tutorial <a href="http://www.webinone.net/tutorials/user-friendly-date-with-codeigniter-and-mysql/">here</a> about the CI date. At that post I used the HTML &lt;select> for the input of date. Sometime our client can want to use text box for the date input. We need the validation for this date. I have found this code from <a href="http://www.adcworks.com/blog/2009/04/code-igniter-date-validation/">here</a>. It is for CI 1.7.* and PHP 5.2.*. So I change some code for the CI 2.0.* and PHP 5.3.*.
</blockquote>
<p>
There's some code snippets included in the post showing how to use it in the form (HTML), setting the validation on the form object (for US and UK validation) and the actual code of the updated custom Validation class.
</p>]]></description>
      <pubDate>Fri, 07 Oct 2011 11:57:21 -0500</pubDate>
    </item>
  </channel>
</rss>

