Drop Down Select File And Include It Into Same Page April 13, 2023 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; Copy to $path_file = $_SERVER['DOCUMENT_ROOT']."/".$file.".php"; Copy But 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 postsSubmitting A Form Without Refreshing The PageHow To Prepare SQL Query Dynamically (column Names Too) Avoiding SQL InjectionHow Change The Link Form Action A Accordance With The ``?Sending Html Mail With Function 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"