Re: Script Problems

From: Date: Tue, 28 Nov 2000 18:32:45 +0000
Subject: Re: Script Problems
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-27651@lists.php.net to get a copy of this message
Thank you all for responding so rapidly. I agree, turning down error reporting is no way to correct sloppy coding (but my scripts ARE working again). So the next question becomes, based on the examples below, is there a better (cleaner) way to write this? I set this up this way so if nothing is entered into the fields it will search all applications and all primary descriptions. > <tr> > <td bgcolor="#006699" align="center" width="245"> > <input type="hidden" name="app" > value="application"> > <font face="Arial, Helvetica, sans-serif" color="#FFFFFF" > size="2">>Model Number</font><br> MB> <input > type="text" > name="model" size="22" maxlength="20" MB> value="<?php > echo $model?>"> > </td> >Returns - Warning: Undefined Variable: model in .....Then the file name and line number. > > This one: > <td bgcolor="#006699" align="center" width="245"> > <input type="hidden" name="parts" > value="primary_description"> > <font face="Arial, Helvetica, sans-serif" color="#FFFFFF" > size="2">>Parts Description</font><br> MB> <input > type="text" > name="part" size="22" maxlength="25" MB> value="<?php > echo $part?>"> > </td> Returns - Warning: Undefined Variable: part in.......etc., etc. > > Everything runs fine under php3 and linux, but falls apart under > php4 and Win2k. Any suggestions? > > There is a php.ini setting for the level of errors which will be > displayed. > > This is a real problem as simply changing the level does nothing to > correct poor coding practices (no offense here not talking > specifically to you). > > I recently tried using a script that was very highly touted for what > it does and indeed if you turn off all errors it does see nice. But > why would people design that way. There were so many errors the the > script was completely crippled. An not just variables unassigned .. > but just sloppy (to me) practices like array[bgcolor] instead of > array['bgcolor'] or defining bgcolor before hand. > > Sorry .. getting off soap box > Thanks again, Mark Mark Barton Abilene Machine, Inc e-mail: mbarton@abilenemachine.com Abilene, Kansas web: http://www.abilenemachine.com

« previous php.general (#27651) next »