RE: [PHP] variable issue
thanks for all the help. I realized that I did not need the else, and the isset() works great! Now I have my calendar working the way I want it to! Thanks! Clint -- Original Message -- From: "Matthew Luchak" <[EMAIL PROTECTED]> Date: Fri, 9 Nov 2001 15:07:22 -0500 if(!isset($dte)) { $dte=date("j", time()+$ctime);} You don't need the else statement. Matthew Luchak Webmaster Kaydara Inc. [EMAIL PROTECTED] -Original Message- From: Clint Tredway [mailto:[EMAIL PROTECTED]] Sent: Friday, November 09, 2001 2:37 PM To: PHP General Subject: [PHP] variable issue Hey everyone, I need some help with a variable issue. How can I delcare a variable and then if a url variable of the same name is present use that value instead? this is what I have: if(!$dte) { $dte=date("j", time()+$ctime); } else { $dte=$dte; } and this causing an error in the 'if' expression. Thanks! clint -- 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] -- 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] -- 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]
RE: [PHP] variable issue
if(!isset($dte)) { $dte=date("j", time()+$ctime);} You don't need the else statement. Matthew Luchak Webmaster Kaydara Inc. [EMAIL PROTECTED] -Original Message- From: Clint Tredway [mailto:[EMAIL PROTECTED]] Sent: Friday, November 09, 2001 2:37 PM To: PHP General Subject: [PHP] variable issue Hey everyone, I need some help with a variable issue. How can I delcare a variable and then if a url variable of the same name is present use that value instead? this is what I have: if(!$dte) { $dte=date("j", time()+$ctime); } else { $dte=$dte; } and this causing an error in the 'if' expression. Thanks! clint -- 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] -- 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]
Re: [PHP] variable issue
replace the if statement if(!$dte) with if (!isset($dte)) - Original Message - From: "Johnson, Kirk" <[EMAIL PROTECTED]> To: "PHP General" <[EMAIL PROTECTED]> Sent: Friday, November 09, 2001 2:35 PM Subject: RE: [PHP] variable issue > The else clause can be removed, since it is not doing anything. What is the > error message? > > Kirk > > > Hey everyone, I need some help with a variable issue. How can > > I delcare a variable and then if a url variable of the same > > name is present use that value instead? > > > > this is what I have: > > if(!$dte) > > { > > $dte=date("j", time()+$ctime); > > } > > else > > { > > $dte=$dte; > > } > > and this causing an error in the 'if' expression. > > -- > 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] > > -- 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]
RE: [PHP] variable issue
The else clause can be removed, since it is not doing anything. What is the error message? Kirk > Hey everyone, I need some help with a variable issue. How can > I delcare a variable and then if a url variable of the same > name is present use that value instead? > > this is what I have: > if(!$dte) > { > $dte=date("j", time()+$ctime); > } > else > { > $dte=$dte; > } > and this causing an error in the 'if' expression. -- 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]