This code snippet validate user input from a form : $year=strip_tags($year); if(empty($$year) || is_numeric($year) || strlen($year)!=4 || $year strip all html tags ( handle by strip_tags ) make sure the year in 4 digit (with strlen help) make sure its number not character (is_numeric) not empty (php empty function) force user enter year of birth […]
Category: PHP
Regex, nightmare for newbie
Regex (Regular Expression) is nightmare for me, validation email, pattern recognizing task always depend on regex. A few software out there will help us (newbie) to learn regex faster with “experience mentor” I like these software : 1. Regexbudy A lot of video demo PHP section 2. Regexcouch For medium level, since I’m totally newbie […]
Configure another extension for php file
While surfing in internet my student see "strange" file extension .love He asked me : "How it could be ?" Well, I told him about another feature of httpd.conf Just open httpd.conf , find this line : AddType application/x-httpd-php .php Change it into AddType application/x-httpd-php .php .love .dear .whatever Save httpd.conf and restart apache You […]
PHP 5.2 released
PHP News PHP 5.2 release PHP Manual (chm, last update 5 Sep 2006) NetBSD 3.1 release, NetBSD 3.1 contains many bug fixes, security updates, new drivers and new features like support for Xen3 DomU Wait XAMPP for update to last version 🙂
Testing mail() function with agrosoft mail server 2
In my last post I have introduce about Agrosoft mail server (AMS) . Since this day isn’t end yet, I’ll start by word “Lets continue today lesson” 🙂 I start by opening MS-Frontpage then make simple form mail which generate HTML code for me and I save it as contact.htm Code in send_mail.php : <?php […]