this form allows the user to choose:
-Categories
-SubCategories
-A Price Range
or input:
- Search Keywords
- Search Location
when the user presses the submit button,
content displayed from another .PHP file is updated.
Is there a way for me to split a form like this, up into different php files for each function of the form. For example, one .PHP file for categories, subcategories, search keywords, etc...
One way would be to have it call one file, then use some branching logic in that file to include the file you want to process that type of request.
PHP Code:
if(!empty($_POST['some_field'])) {
include 'some_file.php';
}
elseif(!empty($_POST['some_other_field'])) {
include 'some_other_file.php';
}
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
Bookmarks