Scenario
Base Class A and its Sub Classes are B, C, D, E, F
Every class have a method B_Menu(), C_Menu(), D_Menu(), E_Menu(), F_Menu() respectively. And following Search_Form ($FileName,$Hea ding,$SubHeadin g) method with different x_Menu() method where x=B, C, D, E, F for every Sub Class mentioned below:
………..
Calling Search_Form ($FileName,$Hea ding,$SubHeadin g) method as follows:
:
:
:
Question?
If I move Search_Form ($FileName,$Hea ding,$SubHeadin g) method to Base Class A
What changes are required? and how can I call it in any Sub Class?
Base Class A and its Sub Classes are B, C, D, E, F
Every class have a method B_Menu(), C_Menu(), D_Menu(), E_Menu(), F_Menu() respectively. And following Search_Form ($FileName,$Hea ding,$SubHeadin g) method with different x_Menu() method where x=B, C, D, E, F for every Sub Class mentioned below:
Code:
[B]<?php function Search_Form($FileName,$Heading,$SubHeading){ ?>[/B]
<FORM method="POST" action="[B]<?php echo $filename;?>[/B]">
<table border="0" cellpadding="0" cellspacing="0" width="100%" id="AutoNumber1" height="344">[B]<?php $this->Page_Heading("$Heading"); ?>[/B]
<tr> <td width="100%" height="51" colspan="2"><BR>
[B]<?php if($Heading=="REPORT")$this->B_Menu(); ?>[/B]
<p align="center"><b><font size="4"> <u>SEARCH FOR[B]<?php echo $SubHeading; ?>[/B]</u></font></b></td></tr><tr><td width="50%" height="51"><strong>User's ID :</strong></td><td width="50%" height="51">
<p align="center"><input type="text" name="PatID" size="10"></td></tr><tr>
<td width="100%" height="19" colspan="2">
------------------------------------------------------OR-------------------------------------------------</td>
</tr><tr><td width="50%" height="51"><strong>First Name :</strong></td>
<td width="50%" height="51"><p align="center"><select size="1" name="FName">
<option selected>Select First Name...</option></select></td></tr><tr>
<td width="50%" height="51"><strong>Last Name : </strong></td>
<td width="50%" height="51"><p align="center"><select size="1" name="LName">
<option selected>Select Last Name...</option></select></td></tr></table>
<p align="center">[B]<?php $this->Submit_Reset(" Search "," Reset "); ?>[/B] </p></FORM>[B]<?php }[/B]
Calling Search_Form ($FileName,$Hea ding,$SubHeadin g) method as follows:
Code:
ObjA-> Search_Form (‘x.php’,’REPORT’,’Update’); ObjB-> Search_Form (‘y.php’,’REPORT’,’Delete’);
:
:
Question?
If I move Search_Form ($FileName,$Hea ding,$SubHeadin g) method to Base Class A
What changes are required? and how can I call it in any Sub Class?
Comment