Listing database values in a select/option

php

#1

I’m beating myself up here because I had this, and I changed something it stopped working and then my power went out. so I’ve forgotten what the heck I did. I know I can get it to work, I just can;t figure out how I did it :(. Maybe an extra set of eyes will help:

class Module_Battle extends Base_Module
{
    /*
      Function: start

    */
    public function start()
    {
        // You may call the requireLogin() function if this module is only available to players who are logged in.
        requireLogin();

        if (isset($_POST['battle_mob']))
        {
          $this->battleMob();
        }

        else
        { 
          $query = $this->db->execute('SELECT `id`, `name` FROM `<ezrpg>mobs`');
          $mobs = $this->db->fetchAll($query);
          $this->tpl->display('battle.tpl');
        }
    }
}
  <form method="post" action="index.php?mod=Battle">
    <select name="selection">
      {foreach from=$mobs item=mob}
        <option value="{$mob->name}">{$mob->name}($mob->id)</option>
      {/foreach}
    </select>
    <input name="battle_mob" type="submit" value="Fight" class="button" />
  </form>