CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 PHP code for validating row

Print topic Send  topic

Author Message
dirksamson

Posts: 32
Posted: 08/22/2004, 11:42 AM

//ValidateRow Method @4-D39C07B9
function ValidateRow($RowNumber)
{
$this->RowErrors = new clsErrors();
$errors .=$this->RowErrors->ToString(); // this is row 365
$this->RowsErrors[$RowNumber] = $errors;
return $errors ? 0 : 1;
}
//End ValidateRow Method

Is this valid code? IIS returns an error, which seems to be quite logical:

Notice: Undefined variable: errors in /home/ressmit/public_html/DB/Mailing/postvakuit.php on line 365
_________________
Dirk
View profile  Send private message
NR
Posted: 08/22/2004, 7:18 PM

Try this in the php.ini 'Error handling and logging' section:
error_reporting = E_ALL & ~E_NOTICE

The ~E_NOTICE is the important part (read the section descriptions)
dirksamson

Posts: 32
Posted: 08/22/2004, 10:22 PM

Consider me a 'purist' ... I like code to be clean and polished, variables to be defined etc.

And -more importantly- I work with several service providers. Some of them have notices on, others don't...
_________________
Dirk
View profile  Send private message
Andreas
Posted: 08/23/2004, 2:18 PM

//ValidateRow Method @4-D39C07B9
function ValidateRow($RowNumber)
{
global $errors;
$this->RowErrors = new clsErrors();
$errors .=$this->RowErrors->ToString(); // this is row 365
$this->RowsErrors[$RowNumber] = $errors;
return $errors ? 0 : 1;
}
//End ValidateRow Method

this might work.

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.