[PHP] expressions
hi, im trying to fix this couple of hours but i couldnt find the mistake... can somebody look at it... first i want to check the $co_area for 3 digital ... it must contain 3 digital if ($co_area != !ereg("([0-9]{3})",$co_area)) { echo " * Area code must be 3 digital"; } second... nickname check works but the first letter could be any number or any letters with this code it accept only letters as first character... i just want any letter or numbers or - _ symboles from 3 to 12 characters... if ($nickname != !eregi("^[-\._\.0-9a-zA-Z]{3,12}$",$nickname)) { $error ="Nickname must be Alphanumeric[ a-z 0-9; - _ ; 3 - 12 characters ]"; $flak=1; } i hope someone can help me to fix this... thanx kumanan [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] functions????
Hi, i got problem with functions when i call the files with url//filename.php?action=pal all the time it says Fatal error: Call to unsupported or undefined function pal_edit() in /cfiles/memberlink.php on line 7 code -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] functions????
o thanks kumanan "Nick Winfield" <[EMAIL PROTECTED]> schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > On Sun, 28 Jan 2001, Kumanan wrote: > > > Hi, > > > > i got problem with functions > > > > > > when i call the files with url//filename.php?action=pal > > > > all the time it says > > Fatal error: Call to unsupported or undefined function pal_edit() in > > /cfiles/memberlink.php on line 7 > > > > Declare your functions before the switch() statement - your switch > statement is being executed before your functions even get a chance to be > defined. :) > > e.g. > > function sayBlah() { > echo "Blah!"; > } > > switch($task) { > case do_stuff: > sayBlah(); > break; > case other_stuff: > # whatever > break; > default: > # whatever > break; > } > > Cheers, > > Nicky W.. > -[ [EMAIL PROTECTED] ]- > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]