• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Question how i Get text from Input run SQL

hello every one

i have a table in my xenforo database with some data
I want to add input to search in it with ID that visitor write it

but i don't know how to get the ID from the User Input To The Model and Run my Sql Statement

I tried this in ControllerPublic
$cemdb = XenForo_Model::create('myModel');
$cems = array();
$identry = $this->_input->filterSingle('identry_input', XenForo_Input::STRING);
$cemtbl = $cemdb->findcem( $identry);
$cems = $cemtbl;
my template FORM
<form action="{xen:link 'cem'}" method="post" class="xenForm">
<dl class="ctrlUnit">
<dt><label for="ctrl_message">Your ID :</label></dt>
<dd><input type="text" name="identry_input" class="textCtrl" id="ctrl_message"  tabindex="101" /></dd>
<dl class="ctrlUnit submitUnit">
<dd><input type="submit" value="Go" accesskey="s" class="button primary" /></dd>
<input type="hidden" name="_xfToken" value="{$visitor.csrf_token_page}" />
this is my Model function it's to simple
  //................................ sreach for id = Numreg .......................
    public function findcem($identry)
      return $this->_getDb()->fetchRow('
            SELECT *
            FROM 5emeres
            WHERE id = ?', $identry);
Neeeeeed Help PLZ