When a user registers for your web site, it is usually a requirement that they have to select a unique username. It can be a pain when your usual usernames are taken. You keep submitting the form just to wait and then see an error message that the username is already taken. Using Ajax to check and see if a username is available before the user submits the form will make your registration page more friendly. Here is one method for doing it using CakePHP, Ajax and jQuery. First, we are going to create a very lighweight… View full post »
Posts Tagged ‘php’
Check for Available Username with CakePHP, Ajax and jQuery
September 27th, 2010 Leave a comment 9 commentsProven Ways to Secure PHP
July 6th, 2010 Leave a comment 2 commentsPHP is one of the most popular languages for web development today. As a result, hackers are always looking for ways to exploit PHP scripts to gain unauthorized access or cause damage to systems. Securing your PHP code is essential in any web application that you develop. When looking at securing your PHP application there are two main categories of methods for securing your code. The first category involves settings in PHP itself, via php.ini, that affect the overall security of your application. The second category deals with coding best practices and writing secure code to prevent… View full post »
PHP Contact Form Tutorial
May 25th, 2010 Leave a comment 3 commentsMany web sites are opting to use a contact form to allow its visitors to communicate. This is larger due to the prevalence of spam bots which harvest email addresses from web sites. In this tutorial, we’re going to build a simple contact form in PHP. This is going to be a pretty simple contact form. We’ll be using a single PHP file to display the form and to process it. This simplifies things quite a bit. Ready? Let’s get started. Step One: Creating the Form The first step is to create some HTML markup for our… View full post »
PHP Interview Questions and Tips
April 24th, 2010 Leave a comment 3 commentsSo you’ve been slinging resumes for a while and now you have an interview for an awesome PHP job. While part of the interview will be the typical job interview, you should also be prepared for a technical interview. Technical interviews are often given to determine how well you truly know the technologies with which you’ll be working. There are numerous books and articles to help you prepare for the job interview portion but very little has been said on preparing for a PHP technical interview. General PHP Questions The first type of questions you’ll be asking in a… View full post »
PHP vs. Ruby on Rails: The Million Dollar Question
April 15th, 2010 Leave a comment 44 commentsPHP and Ruby on Rails both have their very dedicated followers. These followers are so passionate about their chosen platform that gathering good information on the differences between the two can be pretty difficult. Yet this information is vital if you’re going to make a decision on which platform to develop your next project. Here’s a quick look at some of the core features and differences and some additional factors to consider when choosing PHP or Ruby on Rails. PHP is a Language Comparing Ruby on Rails to PHP is unfair. PHP is simply a programming language. … View full post »
Building Scalable Web Applications with PHP & MySQL
February 28th, 2010 Leave a commentScalability is an important consideration when building web applications. Scalability generally refers to the capability to handle a growing traffic load. Traditionally, PHP hasn’t been considered overly scalable. However, that has more to do with how PHP applications have been written in the past rather than any limitation in PHP itself. WordPress and Drupal are both excellent examples of scalable applications built in PHP. Scaling your web application with PHP and MySQL simply involves following some of the practices used in WordPress and Drupal. Employ Modular Design Building a modular application is one sure way of scaling… View full post »
Why Use a PHP Framework?
February 25th, 2010 Leave a comment 3 commentsFrameworks for use in web development have been steadily gaining in popularity. Some web technologies, such as Ruby on Rails, are frameworks. Others, like CSS, are benefiting from the emergence of new frameworks like Blueprint CSS. There are a number of high quality frameworks for use with PHP. These frameworks bring a number of benefits to your PHP development. And it is these benefits that are why you should use a PHP framework. Model-View-Controller (MVC) Most PHP frameworks are based on the design pattern known as Model-View-Controller (MVC). This design pattern uses object oriented code to… View full post »