Re: weird problem in php
| From: | Rabin Vincent | Date: | Mon, 12 Jun 2006 10:15:44 +0000 |
| Subject: | Re: weird problem in php | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-237794@lists.php.net to get a copy of this message | ||
On 6/12/06, weetat <weetat.yeo@cxrus.com> wrote:
I have a form which have <select> tag which have the value for example "-New York". When use submit the form , i need to find the first occurence of "-" , i use strpos function as shown below : $country = $_POST['country']; $findme = '-'; $pos = strpos($country, $findme); if ($pos === false) {Perhaps there is a problem with the HTML for your select box. var_dump($_POST) in your PHP code to check if the value is being sent correctly. Rabin$_logger->logdebug("starting ....searchChassisTblDB() not found");} else {$_logger->logdebug("starting ....searchChassisTblDB() found");} however it always give false . I did not know why. Then i did a testing , added below code in the php file without form submission, it give true value which what i wanted. Anybody have ideas or suggestion what happening ?