Drop Down Select File And Include It Into Same Page March 11, 2024 Post a Comment Tried to do this but it's only echoing the value not actually choosing the .php file to include into the same page. The code is below... ]/$file.php; Copyto $path_file = $_SERVER['DOCUMENT_ROOT']."/".$file.".php"; CopyBut this is very bad for security (you can't trust _POST data). Better change to something like:if (isset($_POST['select']) && $_POST['select']) { if ($_POST['select'] == 'something') include'something.php'; if ($_POST['select'] == 'somethingelse') include'another.php'; } else { include'default.php'; } Copy Share You may like these postsHtml Doctype For Includes (visual Studio Or Html Generic)How To Link Different Style Sheets For Different Php Include FilesHow Do You Call Header.html/footer.html In A Web Page?How To Include An External Html-head? Post a Comment for "Drop Down Select File And Include It Into Same Page"
Post a Comment for "Drop Down Select File And Include It Into Same Page"