I am working on a web application and I am refactoring.
In any case, I was caught in a dilemma: I have some similar or identical parts on my pages that I want to compress only one in order to make some changes only once, as the changes become pain.
But how to do that? I work with php, js and jquery.
Doing this with php echos is a big no; it is really difficult to manage all the brackets, and in any case it doesn’t seem like the most elegant solution, plus, I need to do some control over the things that I print.
I thought about the functions, but since I do not have much experience, I do not know where I can hit my head. Thank you in advance.
EDIT: I was given a few examples.
<form action="insert.php" method="POST" class="big" style="display:none;">
<h3> Insert Contact </h3>
<fieldset class="col2">
</fieldset>
<div>
<input type="submit" value="Send">
<input type="reset" value="Clean Form">
</div>
<input type="text" name="insert" value="1" style="display:none;">
<input type="text" name="modify" value="1" style="display:none;">
<input type="text" name="secret" value="<? echo($perm); ?>" class="hidden">
</form>
, , , . . , , , , , , , , php.