News Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

PHPMaster.com:
An Introduction to Ctype Functions
April 30, 2013 @ 11:38:32

On PHPMaster.com today David Shirey has a written up a new tutorial introducing the ctype functions in PHP. This set of functions provides a handy way to more correctly check values to ensure they're valid (and contain what they should).

If you have a background in C, then you're probably already familiar with the character type functions because that is where they come from (don't forget that PHP is actually written in C). But if you're into Python, then it's only fair to point out that the PHP Ctype functions have absolutely nothing to do with the Python's ctypes library. It's just one of those tragic and totally unavoidable naming similarities.

He briefly explains how the functions work and at least one "gotcha" to watch out for if you're using them for input validation. He then goes through the list of the eleven ctype functions and briefly describes what they do. Some example code is also included showing how you can use them to validate a value based on the true/false return from the function call.

0 comments voice your opinion now!
ctype function introduction tutorial character type

Link: http://phpmaster.com/an-introduction-to-ctype-functions

WebReference.com:
User Personalization with PHP The Verification Code
March 17, 2009 @ 09:37:50

WebReference.com continues their look at user personalization with the second part of the series - how to validate that the users signing up for your site are valid. (Here's part one, the introduction).

In this article, we will be looking at user authentication. User authentication simply means verifying that a particular user has the right to access a part of our application. Because our application deals with user preferences, access control is even more pertinent especially since multiple users are going to try to access this application at any given time.

As a part of this user validation and customization, they need to create a form that non-human scripts have a harder time using (hopefully weeding them out and getting better user information). The article steps you through a few lines of code that you can use to create a simple image of a four-digit number whose value is placed in a session variable so it can be validated on submission of the form.

0 comments voice your opinion now!
captcha image validation user personalization gd random digit



Community Events





Don't see your event here?
Let us know!


threedevsandamaybe framework symfony language laravel developer opinion community podcast release deployment introduction api zendserver list tips library bugfix series interview

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework