Server Side Validation with PHP

Today as part of my study I was required to perform and oral presentation on a IT subject of my choice. With my interest and experience mainly been in web design I felt PHP and validation was a suitable area to aim with data validation been one of the most important aspects of any web page.

I started my presentation like any other talk explaining my topic, what is server side validation? Then taking into account that I was unaware of my audience's experience in web development I went onto explain HTTP requests and the methods available to us for accessing information within HTTP requests.

Before moving into PHP I explained the differences between client side and server side validation showing both advantages and disadvantages for both sides. I only covered POST in my code examples even though I did take the time to explain the key differences between GET and POST and when to use each method.

Keeping the PHP code as simple as possible I demonstrated how to check if the POST array has been set (the form has been submitted) and some basic methods provided to us by PHP for validation including validating empty strings, numeric strings and string lengths.

I have uploaded the PowerPoint presentation and the code I used in my presentation (Links Below).

Please check back in the next few days as I will be adding a more thorough validation script including a mock SQL file and a demonstration on working with database's using PHP.

index.php
funcs.php
serversidevalidation.pptx

Add new comment

The content of this field is kept private and will not be shown publicly.

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.