Also look at empty(). I don't know if the $_POST array will send the key if it as no variable. I know on a regular post it does send the variable, but it has no value. I have used isset with just receiving post data and got strange results. On one I had an isset statement that ran a result that bypassed some code. When is submitted the form I got results as if the isset was being executed and the code was skipped. Just to make sure this was the case, I added echo "hello"; on the first line of the isset bypass coding and after running the script I got the results without the bypass. I took the hello back out and it bypassed! So adding the hello statement affected whether isset gave a positive or negative response. The variable isset was checking in this case was not being sent with a value. I changed to empty() and got the result I was looking for. If $_POST sends the key but not a value when you submit the form without a value assigned to the variable then isset may not always work.
Larry S. Brown Dimension Networks, Inc. (727) 723-8388 -----Original Message----- From: Shams [mailto:[EMAIL PROTECTED]] Sent: Friday, January 10, 2003 4:36 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] checking status of a HTML checkbox thanks a lot, thats what I was looking for :o) Shams "- Edwin" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > "Shams" <[EMAIL PROTECTED]> wrote: > > [snip] > > At the moment I am doing this: > > > > if ( $_POST["insurance"] == "yes" ) > > { > > } > > > > But is there a more "accurate" way of checking the exsistence of > > "insurance"? > [/snip] > > I think you're looking for isset(): > > http://www.php.net/manual/en/function.isset.php > > - E > > __________________________________________________ > Do You Yahoo!? > Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php