Ok, hope this makes it clearer!
I have a class called phone.class.php, code shown below:
<?php
session_start();
include_once( "../layout/layout.class.php" );
include_once( "../../navigation/navigation.class.php" );
class phone
{
/ The layout class /
$var $_layout;
function phone( $searchType )
{
/** Create a new layout class **/
$this->_layout = new layout();
/** Display the search form **/
$this->_displaySearchForm( $searchType );
}
/** Displays the search form to the user, depends on searchType **/
function _displaySearchForm( $searchType )
{
/** Display the search form **/
$this->_layout->newLine(true);
echo "<form action= '' method= 'post'>";
$this->_layout->newLine(true, 2);
echo "<label for= 'searchType'>Please Enter $searchType: </label>";
$this->_layout->newLine(true, 2);
echo "<input type= 'text' id= 'searchType'>";
$this->_layout->newLine(true, 2);
echo "<input type= 'submit' value= 'Search'>";
$this->_layout->newLine(true);
echo "</form>";
}
}//End Phone
?>
I want this to be a link on my website. I am aware that if this were not a class file i could just do phone.php?content=surname and this would produce a form that could be used to search for a surname. However since this is a class and I require to instansiate it i am not sure what to do. Am i going about this wrong. I don't want to over complicate matters!
Cheers