for example i have a page with the following conditions if (isset($team)) {} elseif (isset($request)) {} elseif (isset($admin)) {} else {} now each statement includes many forms and when each form is clicked there's a long php code. if i create everything in one file it's going to be a big mess. what i'm doing is something like this if (isset($team)) { form1 form2 form3 require('pagename.team.php'); } elseif (isset($request)) { form1 form2 form3 require('pagename.request.php'); } elseif (isset($admin)) { form1 form2 form3 require('pagename.admin.php'); } else { form1 form2 form3 require('pagename.noteam.php'); } inside the required php pages i put everything which is being executed when the relevant forms are submitted. if (isset($_post['form1'])) .... my question is, is this a good thing to do or it can cause some issues or maybe it's just stupid for another reason? ty.
Well, I don't see anything wrong at the moment but you might want to use smarty or other template engine. Such a redundancy will eventually drive you nuts. It's something like if(isset($_POST['submit']))
i actually have no idea what template engines are.... i only understand the basic idea of separating html from php