I have one problem, inside the Customer.php, it contains plenty of functions under one class called Customer but when i create a customer in customereditview.php, the customereditview.html consist of form action=index.php, and the button onclick="this.form.action.value='Save'" type="submit". Customereditview is a page where user key in customer information and press save to create an account.
I go and check the index.php, it has the following code
switch($currentModule) {
case 'Customer':
require_once("modules/$currentModule/Customer.php");
$focus = new Customer();
break;
case 'Account':
require_once("modules/$currentModule/Account.php");
$focus = new Account();
break;
case 'Others':
require_once("modules/$currentModule/Other.php");
$focus = new Other();
break;
}
Each Customer, Account and Other.php contains its own class function, which is same name as its .php, the problem is when i click the save button, it calls up the index and load through the case statement, but it doesn't mention which function inside the class to be used and how can the save database transaction can be completed accurately? What have i overlooked? Thank you.


LinkBack URL
About LinkBacks



Reply With Quote
Bookmarks