Re: there must be better way to handle "Null" undefined variables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



if you read my original post you'd see that I already know this!

I even inserted code to fix the problem. The problem is that the

values of the variable THE FIRST TIME are undefined as shown by the code I 

inserted.

I fixed the problem for one of the variables to make sure I perceived the 

problem correctly not being a html guru!

The question is again "Is there a better way?"




--- On Mon, 12/8/08, Daniel Brown <danbrown@xxxxxxx> wrote:

> From: Daniel Brown <danbrown@xxxxxxx>
> Subject: Re:  there must be better way to handle "Null" undefined variables
> To: fredsilsbee@xxxxxxxxx
> Cc: php-windows@xxxxxxxxxxxxx
> Date: Monday, December 8, 2008, 6:06 PM
> For future reference, Fred, please only include the relevant
> code,
> not the entire script.
> 
> On Mon, Dec 8, 2008 at 11:46 AM, Fred Silsbee
> <fredsilsbee@xxxxxxxxx> wrote:
> [snip!]
> >
> > Under windows, the first page has an error <br
> /><b>Notice</b>:  Undefined variable:
> ExercisePrice in
> <b>C:\Inetpub\wwwroot\new_black_scholes.php</b>
> on line <b>198</b><br />
> 
>     This is just a matter of the INI settings
> error_reporting and/or
> error_display being different.  It's not an OS thing at
> all.  You can
> change php.ini on the offending system to this:
> 
>     error_reporting = E_ALL | ~E_NOTICE
>     ; Note that the | is the pipe character.
> 
>     Preferably, though, the variable on line 198 should be
> defined.
> It doesn't absolutely *NEED* to be, but good coding
> standards beg that
> you do.
> 
> [snip!]
> >        <input type="text"
> size="20" maxlength="40"
> name="ExercisePrice"
> >        value="<?php echo $ExercisePrice;
> ?>" />
> [snip!]
> 
>     There's your problem.  $ExercisePrice is called
> (within the <?php
> ?> tags), but was never defined before this.
> 
> -- 
> </Daniel P. Brown>
> http://www.parasane.net/
> daniel.brown@xxxxxxxxxxxx || danbrown@xxxxxxx
> 50% Off Hosting! http://www.pilotpig.net/specials.php


      


-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux