![]() |
Runtime Error
I was working on an OOP user tutorial and I've fixed everything so far except this:
Quote:
First part of User class from user.php: PHP Code:
The first part of the code from the mysql class in mysql.php: PHP Code:
=o thanks |
It's your mysql class constructor. Why are you using the traditional constructor type (the function named the same as the class) and the 'new' __construct() method? You have dual constructors.
|
Redefining already defined [b]constructor[b] for class mysql
[b]constructor[b] __construct(or) Like Sock said. :) What you should do, since you want to start TWO of them, is make two classes and engage BOTH with new classname; Then it engages both __constructors and then you're all free to go mind your business. Hopefully that works. Or simply (if I am wrong), create a class with engages both classes it's functions. $newclass = new classname; classname { __constructor(); } started the two functions defined in the two other classes. Make sure BOTH other classes (2 and 3) do NOT contain the __construct magic function. |
| All times are GMT. The time now is 01:20 AM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0