Visit the Official PHP Website

Search this Site

PHP Programming

By James N Hitz

RegExp Example

Let's create a Regular Expression example to encompass what we learnt about HTML forms, and pattern matching. I will outline our objectives and assumptions:

Objectives

  1. To create a form through which users can enter their suggestions
  2. Validate user input using a diffent script
  3. Return the information back to the user's browser.

Assumptions

  1. Your server is configured to run PHP scripts from the directory php-bin
  2. Your server uses the .php file extension to identify php scripts.

Apparently we'll need two files. The HTML Interface through which the user enter their details and the PHP script that processes this input. Let's start with the HTML Interface...

<< The preg_split Function | The Interface >>

JamHitz Productions