Re: Script Problems

From: Date: Wed, 29 Nov 2000 00:24:56 +0000
Subject: Re: Script Problems
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-27725@lists.php.net to get a copy of this message
On Wed, 29 Nov 2000, Mark Barton wrote: > 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. name="model" size="22" maxlength="20" MB> value="<?php if(!empty($model)) echo $model?>"> or instead of empty() you could look at isset() -- David Robley | WEBMASTER & Mail List Admin RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/ AusEinet | http://auseinet.flinders.edu.au/ Flinders University, ADELAIDE, SOUTH AUSTRALIA

« previous php.general (#27725) next »