hi all.
one doubt/....
now i am using class in PHP for my pgms...
my class is
GetAll.inc.php
<?
class GetAll{
function GetRegion($num)
{
$query=mysql_query("select reg_id ,reg_name from cregion ORDER BY reg_name");
echo"<select size=\"1\" name=\"RN\">";
echo "<option >Choose a Region</option>";
while($row = mysql_fetch_array($query))
{
$reg=$row[reg_id];
echo "<option value=\"$reg\"";
if ($reg == $num)
echo " selected";
echo ">$row[reg_name]</option>n";
}
echo "</select>";
}
}
?>
i am making use of this class in another php file like this and i am getting result also...(ie. for populating dropdown box Region)
that part of code is this:
<tr>
<td width="158" height="22" align="right" class="officeBearers">Region</td>
<td width="5" height="22"> </td>
<td width="532" height="22">
<?php
include("connect.inc.php");
$objmysqlcon= new Connect();
$objmysqlcon->start_connectmysql();
include("GetAll.inc.php");
$post[0]=$_POST['RN'];
$O=new GetAll();
$O->GetRegion($post[0]);
?>
</td>
</tr>
Now i want to save a combination for making use for search later .....
like
$search_strval = Trim($vREGID).Trim($vESTNAME);
$search_strval .= Trim($vCOMPUTERIZED_YR);
$qrysearch_str= "update hos_computer SET hos_computer.search_str = '$search_strval' where ESTCD ='$vESTCD'";
$searchresult_str=mysql_query($qrysearch_str)
or die("Error in query:$qrysearch_str.". mysql_error());
here
$vREGID=$_POST['RN']; which is from that class file.
i need to get the region name in place of this and form my serach_strval like
$search_strval = Trim($vREGIONNAME).Trim($vESTNAME);
$search_strval .= Trim($vCOMPUTERIZED_YR);
HOW TO GET THIS REGION NAME FROM THAT CLASS.....IN MY DROP DOWN PASSING VALUE IS REGIONID AND DISPLAYING VALUES IS REGIONNAME...SO I WANT THIS DISPLAYING VALUE TO BE IN SEARCH STRING....
pls help me
thanx
ckb