Can somebody explain to me how can I create a one page for all crud and my edit for to be the same with my create form?
I don't know how to use


Oh and if someone is intrested in accepting an apprentice to teach and review code.
I would be glad.
I mainly worked with wordpress or frameworks so some basics of php i have missed
Thank you

Could you not do something like:

$action = $_GET['action']; // assume that action.php?action=edit

switch ($action) {

        case "Edit":
            echo "EDIT STUFF HERE";

        case "update":

            echo "Update here";

        echo "Default";

Ok not a bad idea but from what i have heard switch has some performance issues and if is more quick.

I am waiting for further ideas

Thank you for your input

has some performance issues

First get it to work, then worry about performance.

“We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil.” -- Knuth.

I will look into it tomorrow and then post my results thank you all for your input.

Thank you for your help

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.