How can i make a form call its owning class but with a different method. For example:
/** Displays the search form to the user, depends on searchType **/
function _displaySearchForm( $searchType )
{
/** Display the search form **/
$this->_layout->newLine(true);
echo "<div class= 'content'>";
$this->_layout->newLine(true);
echo "<div class= 'phoneSearchTitle'>Search Phone Directory By $searchType </div>";
$this->_layout->newLine(true, 2);
echo "<form action= '' method= 'post'>";
$this->_layout->newLine(true);
echo "<div class= 'phoneSearchField'>";
$this->_layout->newLine(true, 3);
echo "<label for= 'searchType'>Please Enter $searchType: </label>";
$this->_layout->newLine(true, 3);
echo "<input type= 'text' id= 'searchType'>";
$this->_layout->newLine(true, 3);
echo "</div>";
$this->_layout->newLine(true, 3);
echo "<div class= 'phoneSubmitButton'><input type= 'submit' value= 'Search'></div>";
$this->_layout->newLine(true, 2);
echo "</form>";
$this->_layout->newLine(true);
echo "</div>";
}
The above form exists in phone.class.php, After the form is submitted by the user i want it to call a different method from this class that will search the database I have seen this done but can't remember how!
Thanks