Jump to content

include inside a class, how to use a function in the include


sKunKbad

Recommended Posts

I've got a class, and inside one of the methods of the class, a procedural type script is included that has a function to check email addresses, and returns true or false if the email address is good.

 

Because the script is included inside a method of a class, I'm wondering how to use the procedural function, because it is not working right now.

 

This is the include and function usage:

 

include 'domainMXval/domainMXval.php';
			if (!validateEmail($this->email, true)){
				$fail = 1;
				$errorMessageStack[] = '<li>Your email address</li>';
			}

 

I'm just wondering if I need a $this-> somewhere, or what. I've got this working in a procedural script, but now that it is in a class it doesn't work anymore.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.