sKunKbad Posted April 22, 2009 Share Posted April 22, 2009 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. Link to comment https://forums.phpfreaks.com/topic/155149-include-inside-a-class-how-to-use-a-function-in-the-include/ Share on other sites More sharing options...
sKunKbad Posted April 22, 2009 Author Share Posted April 22, 2009 Yeah, I just needed a couple $this->s and everything is ok Link to comment https://forums.phpfreaks.com/topic/155149-include-inside-a-class-how-to-use-a-function-in-the-include/#findComment-816158 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.