Edit: Very simple, understand it, just keep it first and none and that Will work for both the ifs. Well I have written this code and it works fine But if the user type The page will not exist, so I want to include it, if this happens then what is the method to create a file without using it or using something? You can do this and then the better way would be if switch statement IF on the same expression Statement of statement In the same way, in many occasions, you may want to compare the same variable (or expression) with many different values, and execute a different piece of code on which it is equal. (.) Hope you know about the complexity of the code and in your case switch case there is less complexity in poor / average case
if ($ _ request [pag ']) {// variations by $$ = $ _REQUEST ['Pug']; // POSSIVE PASSWISE PAGES if ($ PAG == "registrar") {include "inc / register.php"; } If ($ pag == "Receipt") (Include {"inc / recover.php"}}
pag = ofksaofkoasdkfkopsd ?
switch ($ _ request ['pug']) {case "registrar": include "inc / register.php"; breakage; case: " Recuper ": included" inc / recover.php "; break; default: // by default you want to include the break;}
No comments:
Post a Comment