<?php
if (isset($val))
{
foreach ($val as $va){?>
<?php echo $va['namehost'];?><br>
<?php }
}?>
ASKER
public function mgetclinds($a,$b,$c,$d,$e,$f,$g,$h,$i,$j)
{
$array = array(
'state' => $f,
'city' => $g,
'area' => $h,
'cate' => $i,
'for' => $j
);
$this->db->like($array);
$query=$this->db->get($a,$b,$c,$d,$e);
return $query->result_array();
}?>
ASKER
<?php //ON CONTROLLER//
public function extra1()
{
$dt['val'] = '';
if($this->input->post('submit'))
{
$selected1=$this->input->post('state');
$selected2=$this->input->post('city');
$selected3=$this->input->post('area');
$selected4=$this->input->post('cate');
$selected5=$this->input->post('for');
$dt['val']=$this->demomod->mgetclinds('reg',$selected1,$selected2,$selected3,$selected4,$selected5);
// echo "$selected1,$selected2,$selected3,$selected4,$selected5";
}
$this->load->view('extra1',$dt);
}
?>
ASKER
ASKER
PHP is a widely-used server-side scripting language especially suited for web development, powering tens of millions of sites from Facebook to personal WordPress blogs. PHP is often paired with the MySQL relational database, but includes support for most other mainstream databases. By utilizing different Server APIs, PHP can work on many different web servers as a server-side scripting language.
TRUSTED BY
http://php.net/manual/en/function.isset.php
In case you're new to PHP and want to get a foundation (necessary for working on PHP internals of CodeIgniter or any other framework) this article might help.
https://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/A_11769-And-by-the-way-I-am-new-to-PHP.html