Since its inception, PHP has moved from a procedural language to an object-oriented one; some of its procedural roots, however, still linger. One of these procedural remnants is an antique method of accessing SQL databases; many programmers still use the older mysql and postgresql procedural modules to access databases, and even those who have switched to newer methods, like mysqli, might still be hampered by the fact that such a module only works with mysqli. PHP has since implemented better methods, but many procedural PHP developers are unsure of how to use newer, object-oriented MySQL connection methods. Let’s delve… View full post »
Posts Tagged ‘php tutorial’
Check for Available Username with CakePHP, Ajax and jQuery
September 27th, 2010 Leave a comment 9 commentsWhen 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 »
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 »