Jump to content

PHP linking problem


lucerias

Recommended Posts

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, 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.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.