on a guess - echo the value of $search_name in between each call to see what happens to it as it goes through - you may find that something is going haywire in there somewhere (or that it's blank)
-b // -----Original Message----- // From: Markus Lervik [mailto:[EMAIL PROTECTED]] // Sent: Monday, 14 January 2002 9:42 PM // To: [EMAIL PROTECTED] // Subject: [PHP-DB] What is REG_BADRPT, and why do I get it? // // // // Hello! // // I have quite a weird problem. When I use ereg or ereg_replace // I get a REG_BADRPT warning, like so : // // Warning: REG_BADRPT in /var/www/html/mag/search.php on line 35 // Warning: REG_BADRPT in /var/www/html/mag/search.php on line 36 // // The offending lines are // // if(ereg("*",$search_name)) { ereg_replace("*","%",$search_name); } // if(ereg("?",$search_name)) { ereg_replace("?","_",$search_name); } // // but just two lines above them I have // // if(ereg("*",$search_id)) { ereg_replace("*","%",$search_id); } // if(ereg("?",$search_id)) { ereg_replace("?","_",$search_id); } // // and two similar lines of code below them, yet PHP doesn't complain // about them. Anyone have any ideas as to what's causing the warning? // // // Cheers, // Markus // // -- // Markus Lervik // Linux-administrator with a kungfoo grip // Vaasa City Library - Regional Library // [EMAIL PROTECTED] // +358-6-325 3589 / +358-40-832 6709 // // -- // PHP Database 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 Database 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]