I have the following structure for my application:
myapp/index.php: index page
myapp/mycont/myfunc/productID: dedicated page for product
index.php
has links that open up myapp/mycont/myfunc/productID
Hence, the controller functions are defined as:
index() {...}
myfunc($id) {...}
As, both my functions are almost same I wanted to remove the myfunc()
function and change the URLs as:
myapp/: index page
myapp/productID: dedicated page for product
Both the above URLs should use index()
function, but the index function throws error if I try to pass parameters to it.