What is a << Warning: Invalid preceding regular expression >> mean when running a page?
Output ----------------------------------- Warning: Invalid preceding regular expression in /ereg.php on line 4 PHP Page Source ------------------------- <% function invalid_string($string,$valid) { for ($i=0; $i<strlen($string); $i++) { if (!ereg ($string[$i], $valid)) return true; \\Line 4; } return false; } if ($Action=="Submit") { $validChars = "1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ "; $validAlphas = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ "; $validNums = "1234567890"; if (invalid_string($Word,$validChars)) $Msg = "You entered a bad word."; else $Msg = "That word is acceptable."; } %> <html> <head> <title>Ereg</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body bgcolor="#FFFFFF" text="#000000"> <%=$Msg;%><title>EREG</title> <form name="form1" method="post" action="ereg.php"> Please enter a valid word only. Only alphanumeric characters! I dare you to try anything else.<br> <input type="text" name="Word" size="20" maxlength="20"> <input type="submit" name="Action" value="Submit"> </form> </body> </html> -- 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]