note 13521 deleted from function.ereg by jimw

From: Date: Fri, 02 Nov 2001 01:28:15 +0000
Subject: note 13521 deleted from function.ereg by jimw
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-20150@lists.php.net to get a copy of this message
This is a script for validade a licence ex : 1d2e3g-5d5f6g-e98r56 The first page must be a form with 3 field : $codea $codeb and $codec ANd this is the magic script :) <? $enabler_code = "$codea-$codeb-$codec"; if ($codea == "" || $codeb == "" || $codec == "") { echo "$error $typa Enabler Code - You must be have 6 caracters by field !$type<BR> <a href=javascript:history.go(-1)>$erreur</A>";} else { if ($enabler_code == "$word" ) { echo "$error $typa Old Enabler Code is the same of the New Enabler Code$type<BR> <a href=javascript:history.go(-1)>$erreur</A>";} else { if (!eregi("^[0-9a-z][0-9a-z][0-9a-z][0-9a-z][0-9a-z][0-9a-z]$", $codea)) { echo "You are do an error in the first field : $codea "; } else { if (!eregi("^[0-9a-z][0-9a-z][0-9a-z][0-9a-z][0-9a-z][0-9a-z]$", $codeb)) { echo "You are do an error in the first field : $codeb "; } else { if (!eregi("^[0-9a-z][0-9a-z][0-9a-z][0-9a-z][0-9a-z][0-9a-z]$", $codec)) { echo "You are do an error in the first field : $codec "; } else { echo("VALID !"); } } } ?> Franck from www.gerbille.net

« previous php.notes (#20150) next »