Re: [PHP] isset bug?

2003-08-22 Thread Curt Zirzow
* Thus wrote Christian Calloway ([EMAIL PROTECTED]): Ok, here's the deal. I like to use $_GET and $_POST variables without values to notify my scripts that some action must be taken. For example, given the following URL: http://blahdomain/blah.php?productid=1edit or given the following

Re: [PHP] isset bug?

2003-08-22 Thread Christian Calloway
What I was trying to avoid is exactly that. It would require changing links and hidden fields throughout the entire application, which would take hours to track down. I am looking for a nice lazy and easy fix. Curt Zirzow [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] * Thus wrote

Re: [PHP] isset bug?

2003-08-22 Thread Robert Cummings
This should help: http://www.php.net/manual/en/function.array-key-exists.php Cheers, Rob. On Fri, 2003-08-22 at 13:26, Curt Zirzow wrote: * Thus wrote Christian Calloway ([EMAIL PROTECTED]): Ok, here's the deal. I like to use $_GET and $_POST variables without values to notify my

[PHP] isset function problem

2003-07-10 Thread Denis L. Menezes
I have the following code : Quote: if (isset($SenderEmailAddress)){ mail($mailTo, $mailSubject, $Message); } Unquote All I want to do is that , if the $SenderEmailAddress is not entered, the mail() function should not run. However, if the $senderEmailAddress variable is not set, the

Re: [PHP] isset function problem

2003-07-10 Thread Dean E. Weimer
What about the rest of the code? How is this variable defined? I have had this happen in some code before, I found that the variable was set to . Try using: if (isset($SenderEmailAddress) $SenderEmailAddress != ) { mail($mailTo, $mailSubject, $Message); } I have the following code :

Re: [PHP] isset function problem

2003-07-10 Thread sven
... or: if(!empty($SenderEmailAddress)) { ... } Dean E. Weimer wrote: What about the rest of the code? How is this variable defined? I have had this happen in some code before, I found that the variable was set to . Try using: if (isset($SenderEmailAddress) $SenderEmailAddress != ) {

Re: [PHP] isset function problem

2003-07-10 Thread Jason Wong
On Thursday 10 July 2003 21:53, Denis L. Menezes wrote: I have the following code : Quote: if (isset($SenderEmailAddress)){ mail($mailTo, $mailSubject, $Message); } Unquote All I want to do is that , if the $SenderEmailAddress is not entered, the mail() function should not run.

Re: [PHP] IsSet() and $_SESSION - BUG?

2003-06-30 Thread John Manko
Hello everyone. I was able to determine what was causing my problem with session variables not being persitant across page requests. I want to give you the full scope here, so I'm going to paste the code (and if you have any code tips, please let me know). I think the problem might be this

Re: [PHP] IsSet() and $_SESSION - BUG?

2003-06-30 Thread Jason Wong
On Tuesday 01 July 2003 12:46, John Manko wrote: Hello everyone. I was able to determine what was causing my problem with session variables not being persitant across page requests. I want to give you the full scope here, so I'm going to paste the code (and if you have any code tips, please

[PHP] IsSet() and $_SESSION

2003-06-29 Thread John Manko
I'm having a problem with the value that isset returns on $_SESSION variables. For some reason, even if $_SESSION['uid'] is set, isset returns FALSE. Here is the code: -- file1.php --- include file2.php; if (!isset($_SESSION[uid])) { // This first time $_SESSION[uid] is

[PHP] isset()

2003-06-14 Thread Daniel J. Rychlik
Having a bit of trouble with my forms returnin 1 in the form fields accept the data that was entered. I think its because of this line, $output_fname = isset($HTTP_POST_VARS['fname']); I have a command action handler also that works in the same script and it seems to work well, the only

Re: [PHP] isset()

2003-06-14 Thread Daniel J. Rychlik
PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, June 14, 2003 4:54 PM Subject: [PHP] isset() Having a bit of trouble with my forms returnin 1 in the form fields accept the data that was entered. I think its because of this line, $output_fname = isset($HTTP_POST_VARS['fname']); I have a command

Re: [PHP] isset()

2003-06-14 Thread Justin French
:54 PM Subject: [PHP] isset() Having a bit of trouble with my forms returnin 1 in the form fields accept the data that was entered. I think its because of this line, $output_fname = isset($HTTP_POST_VARS['fname']); I have a command action handler also that works in the same script

[PHP] Isset

2003-03-21 Thread Liam Gibbs
Is isset() better than $ != ? Often, I may have a 0 as values. While $ != doesn't recognize 0s (as in, that if would be false), isset() seems to work. Should I change all my $ != to isset()s, or are there other factors I should check?

Re: [PHP] Isset

2003-03-21 Thread Liam Gibbs
Responding to myself: Is isset() better than $ != ? Often, I may have a 0 as values. While $ != doesn't recognize 0s (as in, that if would be false), isset() seems to work. Should I change all my $ != to isset()s, or are there other factors I should check? Conversely, what about empty(). Is

Re: [PHP] Isset

2003-03-21 Thread Michael Sweeney
It depends on what you're trying to test. If you want to find out if a variable is explicitly set to an empty string, then isset() is not your answer. If you want find out if a variable exists or is set to a non-null value, isset() will work. However, it is not always going to give you the

[PHP] isset doesn't like -?

2002-11-10 Thread UberGoober
I don't know if this is a bug, or what, but I get an error when trying the following if ( isset($adodbobject-Fields('myresult') ) ) { // do something } PHP throws an error ( not warning ) saying: Parse error: parse error, expecting `','' or `')'' in /path/to/index.php on line 45 However, when I

RE: [PHP] isset doesn't like -?

2002-11-10 Thread John W. Holmes
I don't know if this is a bug, or what, but I get an error when trying the following if ( isset($adodbobject-Fields('myresult') ) ) { // do something } PHP throws an error ( not warning ) saying: Parse error: parse error, expecting `','' or `')'' in /path/to/index.php on line 45

Re: [PHP] isset doesn't like -?

2002-11-10 Thread UberGoober
That's because isset() is expecting a variable, not a function. In your first example, you're trying to see if a function is set, not a variable. In your second example, you're doing it right... ---John Holmes... That actually makes sense once I thought about it, a function referencing a

Re: [PHP] isset doesn't like -?

2002-11-10 Thread Michael Sims
On Sun, 10 Nov 2002 18:34:52 -0600, you wrote: PS: what is the proper term for the - syntax? pointer? In Perl it's called an infix operator. I think in PHP the technical term for it is that - thingy... :-) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] isset($var) !empty($var) same time!

2002-08-03 Thread lallous
Just use empty() ?! With error_reporting(E_ALL) you'll get a bunch of warnings if you only use empty() w/o the isset() ! use isset() first and then check wheter empty or not empty! so there is not one function that tests for empty and isset same time!? Elias Analysis Solutions [EMAIL

Re: [PHP] isset($var) !empty($var) same time!

2002-08-03 Thread Verdana Musone
. - Original Message - From: lallous Sent: 2002Äê8ÔÂ3ÈÕ 15:01 To: [EMAIL PROTECTED] Subject: Re: [PHP] isset($var) !empty($var) same time! Just use empty() ?! With error_reporting(E_ALL) you'll get a bunch of warnings if you only use empty() w/o the isset() ! use isset() first and then check

Re: [PHP] isset($var) !empty($var) same time!

2002-08-03 Thread lallous
ÈÕ 15:01 To: [EMAIL PROTECTED] Subject: Re: [PHP] isset($var) !empty($var) same time! Just use empty() ?! With error_reporting(E_ALL) you'll get a bunch of warnings if you only use empty() w/o the isset() ! use isset() first and then check wheter empty or not empty! so there is not one

Re: [PHP] isset($var) !empty($var) same time!

2002-08-03 Thread Verdana Musone
I had given a try on your code, But it really output 1, a true value. I used PHP 4.2.2+Apache 1.3.26 under Win2K. And u? - Original Message - From: lallous Sent: 2002Äê8ÔÂ3ÈÕ 16:19 To: [EMAIL PROTECTED] Subject: Re: [PHP] isset($var) !empty($var) same time! because your variable

[PHP] isset($var) !empty($var) same time!

2002-08-02 Thread lallous
I have wrote this function: function issne($var) { return isset($var) !empty($var) ? true : false; } which can be called as: if (issne($mightbeundefinedvariable)) echo using this variable; is there is any builtin function that does that? (one function call). //Elias -- PHP General

Re: [PHP] isset($var) !empty($var) same time!

2002-08-02 Thread Analysis Solutions
On Fri, Aug 02, 2002 at 04:48:17PM +0200, lallous wrote: function issne($var) { return isset($var) !empty($var) ? true : false; } is there is any builtin function that does that? (one function call). Yes. Just use empty(). It automatically checks if the variable is: not set

Re: [PHP] isset($var) !empty($var) same time!

2002-08-02 Thread Jürgen
But if this is true what you say, that empty() checks for not set null an empty string zero Why would i ever want to use isset() then? If i understood you correctly, would the following op = isset($_GET['op']) !empty($_GET['op']) ? $_GET['op'] : ''; be the same as op =

Re: [PHP] isset($var) !empty($var) same time!

2002-08-02 Thread Analysis Solutions
Folks: On Fri, Aug 02, 2002 at 07:01:38PM +0200, Jürgen wrote: Why would i ever want to use isset() then? Because sometimes you just want to check if something is set due to null, '' and 0 being important. $var = ''; empty($var); // evaluates to true isset($var); // evaluates to

[PHP] isset

2002-07-09 Thread Preston Wade
Hello All, I am trying to use the isset function to test if the page has been submitted, but it seems as though it is not working. I am wondering is there a configuration option that is messing with the functionality of isset. Any help would be appreciated. Thanks, Preston Wade -- PHP

Re: [PHP] isset

2002-07-09 Thread Rasmus Lerdorf
register_globals on or off? On Tue, 9 Jul 2002, Preston Wade wrote: Hello All, I am trying to use the isset function to test if the page has been submitted, but it seems as though it is not working. I am wondering is there a configuration option that is messing with the functionality of

Re: [PHP] isset

2002-07-09 Thread vins
that seem always to be the prob with any php coding now days globals on or off Rasmus Lerdorf [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... register_globals on or off? On Tue, 9 Jul 2002, Preston Wade wrote: Hello All, I am trying to use the isset

Re: [PHP] isset

2002-07-09 Thread Rasmus Lerdorf
Yup On Wed, 10 Jul 2002, vins wrote: that seem always to be the prob with any php coding now days globals on or off Rasmus Lerdorf [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... register_globals on or off? On Tue, 9 Jul 2002, Preston Wade wrote:

Re: [PHP] isset

2002-07-09 Thread Jim lucas
what is it you are testing for? a page that has been submitted. do you mean from an html form or some other method? Jim Lucas - Original Message - From: Preston Wade [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, July 09, 2002 3:20 PM Subject: [PHP] isset Hello All, I am

RE: [PHP] isset

2002-07-09 Thread Preston Wade
HTML form. register_globals is off. Thanks, Preston -Original Message- From: Jim lucas [EMAIL PROTECTED]@INTERNET@HHC Sent: Tuesday, July 09, 2002 5:29 PM To: Preston Wade; [EMAIL PROTECTED] Subject: Re: [PHP] isset ... what is it you are testing for? a page

Re: [PHP] isset

2002-07-09 Thread Kevin Stone
.. extract($_POST); if (isset($submit)) {} Hope this gets you started. Read up on the manual. http://www.php.net. :) -Kevin - Original Message - From: Preston Wade [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, July 09, 2002 4:20 PM Subject: [PHP] isset Hello All, I am trying

Re: [PHP] isset

2002-07-09 Thread Kevin Stone
Look at that we get an easy question and 50 people reply. Today has just been our day for spam. *LOL* :) -Kevin - Original Message - From: Kevin Stone [EMAIL PROTECTED] To: Preston Wade [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, July 09, 2002 4:37 PM Subject: Re: [PHP] isset

RE: [PHP] isset

2002-07-09 Thread Preston Wade
This is what I was looking for. Thanks! Preston -Original Message- From: Kevin Stone [EMAIL PROTECTED]@INTERNET@HHC Sent: Tuesday, July 09, 2002 5:37 PM To: Preston Wade; [EMAIL PROTECTED] Subject: Re: [PHP] isset ... form method=post input type=submit name=submit

Re: [PHP] isset

2002-07-09 Thread vins
Message - From: Kevin Stone [EMAIL PROTECTED] To: Preston Wade [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, July 09, 2002 4:37 PM Subject: Re: [PHP] isset form method=post input type=submit name=submit /form if (isset($_POST['submit'])){} // or // if (isset($HTTP_POST_VARS

RE: [PHP] isset

2002-07-09 Thread Lazor, Ed
Me too ;) -Original Message- i agree to that Look at that we get an easy question and 50 people reply. Today has just been our day for spam. *LOL* :) This message is intended for the sole use of the

[PHP] isset?

2002-02-27 Thread jtjohnston
So what is the good of isset? What does if(isset($submit)) do differently than if($submit) ?? J -- PHP General Mailing List (http://wwwphpnet/) To unsubscribe, visit: http://wwwphpnet/unsubphp

RE: [PHP] isset?

2002-02-27 Thread Niklas Lampén
PROTECTED]] Sent: 28. helmikuuta 2002 7:34 To: [EMAIL PROTECTED] Subject: [PHP] isset? So what is the good of isset? What does if(isset($submit)) do differently than if($submit) ?? J -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP

[PHP] !isset ??

2002-02-06 Thread Erik Price
Hm. I hope I'm not opening an old wound: Curious about the proper way to test for the existence of a variable, I decided to read up on isset() at php.net's function manual pages. It seems at first to be a way to test whether or not a variable has been set. But reading the annotations below

Re: [PHP] !isset ??

2002-02-06 Thread Michael Sims
At 03:06 PM 2/6/2002 -0500, Erik Price wrote: Pretty confusing. Can anyone shed some light on whether or not there is a final definite way to do this? I've used (!($_POST['var'])) with no problems in the past, but does good coding style suggest that I use (!isset($_POST['var'])) now? The

Re: [PHP] !isset ??

2002-02-06 Thread Erik Price
On Wednesday, February 6, 2002, at 03:42 PM, Michael Sims wrote: This is fine for most cases, but let's say that $_POST['var'] *is* set to either an empty string () or a string containing zero (0). Your test will fail, because both of these are evaluated as FALSE when cast as a

[PHP] isset

2001-09-04 Thread Jeremy Morano
Hi , Is there anyway of hiding the name of the website in the isset Enter Network Password window? if (isset( $PHP_AUTH_USER ) isset($PHP_AUTH_PW)) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

[PHP] isset($x) fails !

2001-06-22 Thread kaab kaoutar
Hi! isset() fails :( i peeferd using it so as not to use session_start() when the guy is not logged ! _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. -- PHP General Mailing List

Re: [PHP] isset($x) fails !

2001-06-22 Thread Chris Lee
need a little more data. how is it failing ? where in what code ? how are you using it ? in what way do you want it to work ? http://php.net/manual/en/function.isset.php -- Chris Lee [EMAIL PROTECTED] kaab kaoutar [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL

[PHP] isset() VS if($var)

2001-04-09 Thread Jesper Blomström
Hi! Is there any difference between writing: isset($my_var) and... if ($my_var) ?? Thanks! / Jesper Blomstroem -- Jesper Blomstrm [EMAIL PROTECTED] Arbete: 08-566 280 08 Hem:08-669 23 10 Mobil: 070-30 24 911 -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] isset() VS if($var)

2001-04-09 Thread Adam Wright
age - From: "Jesper Blomstrm" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, April 09, 2001 1:56 PM Subject: [PHP] isset() VS if($var) Hi! Is there any difference between writing: isset($my_var) and... if ($my_var) ?? Thanks! / Jesper Blomstroem -- Jesper Bloms

RE: [PHP] isset() VS if($var)

2001-04-09 Thread PHPBeginner.com
, 2001 9:57 PM To: [EMAIL PROTECTED] Subject: [PHP] isset() VS if($var) Hi! Is there any difference between writing: isset($my_var) and... if ($my_var) ?? Thanks! / Jesper Blomstroem -- Jesper Blomstrm [EMAIL PROTECTED] Arbete: 08-566 280 08 Hem:08-669 23 10 Mobil: 070-30 24 911

Re: [PHP] isset() VS if($var)

2001-04-09 Thread Jesper Blomström
der, Chief Developer PHPBeginner.com (Where PHP Begins) [EMAIL PROTECTED] www.phpbeginner.com -Original Message- From: Jesper Blomstrm [mailto:[EMAIL PROTECTED]] Sent: Monday, April 09, 2001 9:57 PM To: [EMAIL PROTECTED] Subject: [PHP] isset() VS if($var) Hi! Is there any

Re: [PHP] isset and multiple selects

2001-03-11 Thread Jens Nedal
on 10.03.2001 10:10 Uhr, Alexander Lohse at [EMAIL PROTECTED] wrote: Hi, is it a fact that: If I have multiple select with e.g. "pers[]" as name, I cannot check for an isset($pers) if the user left the field blank? I know it all works with textfields ... But in this case isset() seems

[PHP] isset and multiple selects

2001-03-10 Thread Alexander Lohse
Hi, is it a fact that: If I have multiple select with e.g. "pers[]" as name, I cannot check for an isset($pers) if the user left the field blank? I know it all works with textfields ... But in this case isset() seems not work. There is also no entry in HTTP_POST_VARS for that. Or might this

RE: [PHP] isset()

2001-02-26 Thread Johnson, Kirk
Wow, I hope you all will forgive me for one last go around on this thread :) Technically, what does "set" mean? It is not the same as "is registered" or "has a value", right? What is "is set"? Is it "introduced to the global namespace"? TIA Kirk Except that it will throw a warning in PHP4 if

Re: [PHP] isset()

2001-02-26 Thread Christian Reiniger
On Monday 26 February 2001 18:07, Johnson, Kirk wrote: Wow, I hope you all will forgive me for one last go around on this thread :) Technically, what does "set" mean? It is not the same as "is registered" or "has a value", right? What is "is set"? Is it "introduced to the global namespace"?

Re: [PHP] isset()

2001-02-25 Thread Joe Stump
you do not want to use strlen() for the following reasons: 1) makes code unreadable - very sloppy Yeah and your if(isset($var) $var != '') is pretty 2) overhead You call one function and do two comparisons - vs an age old C function I'd like to run some numbers on that. 3) it will

RE: [PHP] isset()

2001-02-25 Thread PHPBeginner.com
: Sunday, February 25, 2001 5:01 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [PHP] isset() On Sat, 24 Feb 2001 17:51:07 +0100, Christian Reiniger ([EMAIL PROTECTED]) wrote: On Saturday 24 February 2001 17:18, PHPBeginner.com wrote: in my preceding email I've written: if($var

Re: [PHP] isset()

2001-02-25 Thread Chris Adams
On 25 Feb 2001 00:01:30 -0800, Mark Maggelet [EMAIL PROTECTED] wrote: On Sat, 24 Feb 2001 17:51:07 +0100, Christian Reiniger ([EMAIL PROTECTED]) wrote: On Saturday 24 February 2001 17:18, PHPBeginner.com wrote: in my preceding email I've written: if($var!='') will fix your all your worries

Re: [PHP] isset()

2001-02-25 Thread Joe Stump
empty() fails when $var == 0 --Joe On Sun, Feb 25, 2001 at 10:50:15AM -0800, Chris Adams wrote: On 25 Feb 2001 00:01:30 -0800, Mark Maggelet [EMAIL PROTECTED] wrote: On Sat, 24 Feb 2001 17:51:07 +0100, Christian Reiniger ([EMAIL PROTECTED]) wrote: On Saturday 24 February 2001 17:18,

Re: [PHP] isset()

2001-02-24 Thread Joe Stump
: [PHP] isset() You're wrong in saying that you "usually know what the variable will be" - you never know what it's going to be. You aren't entering it you need to remember that mostly idiots are inputting the data :O) --Joe On Sat, Feb 24, 2001 at 04:17:02PM +0900, PHPBe

RE: [PHP] isset()

2001-02-24 Thread PHPBeginner.com
- From: Joe Stump [mailto:[EMAIL PROTECTED]] Sent: Sunday, February 25, 2001 1:09 AM To: PHPBeginner.com Cc: [EMAIL PROTECTED] Subject: Re: [PHP] isset() For the last time - put an input box on a page and submit with NOTHING in the box. Now I want SOMETHING in that box (like a name) - isset

Re: [PHP] isset()

2001-02-24 Thread Christian Reiniger
On Saturday 24 February 2001 17:18, PHPBeginner.com wrote: in my preceding email I've written: if($var!='') will fix your all your worries without an intervention of a strings function. Except that it will throw a warning in PHP4 if $var is not set. = isset () should be used. --

Re: [PHP] isset()

2001-02-24 Thread Mark Maggelet
On Sat, 24 Feb 2001 17:51:07 +0100, Christian Reiniger ([EMAIL PROTECTED]) wrote: On Saturday 24 February 2001 17:18, PHPBeginner.com wrote: in my preceding email I've written: if($var!='') will fix your all your worries without an intervention of a strings function. Except that it will

RE: [PHP] isset()

2001-02-23 Thread PHPBeginner.com
Joe Stump [mailto:[EMAIL PROTECTED]] Sent: Friday, February 23, 2001 3:07 AM To: Steve Edberg Cc: Jacky@lilst; [EMAIL PROTECTED] Subject: Re: [PHP] isset() I stand firm on strlen() for the following reasons ... if(!$var) will sometimes act strangely (has for me in the past) when variabl

Re: [PHP] isset()

2001-02-23 Thread Joe Stump
www.phpbeginner.com -Original Message- From: Joe Stump [mailto:[EMAIL PROTECTED]] Sent: Friday, February 23, 2001 3:07 AM To: Steve Edberg Cc: Jacky@lilst; [EMAIL PROTECTED] Subject: Re: [PHP] isset() I stand firm on strlen() for the following reasons ... if(!$var

RE: [PHP] isset()

2001-02-23 Thread PHPBeginner.com
: Re: [PHP] isset() You're wrong in saying that you "usually know what the variable will be" - you never know what it's going to be. You aren't entering it you need to remember that mostly idiots are inputting the data :O) --Joe On Sat, Feb 24, 2001 at 04:17:02PM +0900, PHPBeginner

RE: [PHP] isset()

2001-02-23 Thread PHPBeginner.com
:[EMAIL PROTECTED]] Sent: Saturday, February 24, 2001 4:25 PM To: PHPBeginner.com Cc: [EMAIL PROTECTED] Subject: Re: [PHP] isset() You're wrong in saying that you "usually know what the variable will be" - you never know what it's going to be. You aren't entering it you need t

[PHP] isset()

2001-02-22 Thread [EMAIL PROTECTED]
People I tried to check if teh field has set a vaule in it before submit using isset with the sniplet below if ((isset($AgeChild))=="false") { $AgeChild = "NA"; } The resule is that it always displays NA whether or not it has vaule in the field, what is the correct way of using isset for this

Re: [PHP] isset()

2001-02-22 Thread [EMAIL PROTECTED]
[PHP] isset()yes, it is the var from the form Jack [EMAIL PROTECTED] "There is nothing more rewarding than reaching the goal you set for yourself" - Original Message - From: Thiva Charanasri To: 'Jacky@lilst' Sent: Thursday, February 22, 2001 3:59 AM Subject: [

Re: [PHP] isset()

2001-02-22 Thread Philip Olson
People I tried to check if teh field has set a vaule in it before submit using isset with the sniplet below if ((isset($AgeChild))=="false") { $AgeChild = "NA"; } if you removed the quotes around "false" it should work (as currently "false" is being treated as a string) but another way

RE: [PHP] isset()

2001-02-22 Thread PHPBeginner.com
8:07 AM To: [EMAIL PROTECTED] Subject: [PHP] isset() People I tried to check if teh field has set a vaule in it before submit using isset with the sniplet below if ((isset($AgeChild))=="false") { $AgeChild = "NA"; } The resule is that it always displays NA whether

Re: [PHP] isset()

2001-02-22 Thread Joe Stump
I stand firm on strlen() for the following reasons ... if(!$var) will sometimes act strangely (has for me in the past) when variables are set to something other than what you are expecting. if(isset($var)) will return true if your text field is declared but not filled in. if(empty($var)) will

Re: [PHP] isset()

2001-02-22 Thread Ernest E Vogelsinger
At 19:07 22.02.2001, Joe Stump said: [snip] I'll take an extra bazillionth of a second to know for sure I have what I need [snip] Do you really know _how_ right you are? g ...ebird O Ernest E.

[PHP] isset inside echo?

2001-01-18 Thread Romulo Roberto Pereira
it is possible to use isset inside a echo? like this: $checked = "CHECKED"; $nothing = ""; echo "input type=checkbox name=cb[0] value=$value[0] ".isset(cb[0])?$checked:$nothing.""; Rom

Re: [PHP] isset inside echo?

2001-01-18 Thread Ignacio Vazquez-Abrams
On Thu, 18 Jan 2001, Romulo Roberto Pereira wrote: it is possible to use isset inside a echo? like this: $checked = "CHECKED"; $nothing = ""; echo "input type=checkbox name=cb[0] value=$value[0] ".isset(cb[0])?$checked:$nothing.""; Rom isset() is a proper function, so yes. --

<    1   2