Jump to content

ramaz

Member
  • Posts

    1
  • Joined

  • Last visited

About ramaz

ramaz's Achievements

Junior Member

Junior Member (1/3)

0

Reputation

  1. Hello, I have a little problem with products page, I have looked trough forums, but haven't found anything similar. The deal is simple I need to add some smarty {$variables} to my products page. Variables should be Server groups name from "tblservergroups" and host name from "tblservers", I have found similar code, but it's made from serverstatus.php I have been tryingto get something out of it but nothing worked, variable was created, but data just don't get assigned. Heres the code: {php} foreach ($this->_tpl_vars['servers'] as $key => $value) { $result = select_query("tblservers","hostname",array("name" => $value['name'])); $data = mysql_fetch_array($result); $this->_tpl_vars['servers'][$key]['hostname'] = $data['hostname']; } {/php} Can anybody help me? By the way, I need those variables to be assigned, to main $services foreach function, that's the main problem and I can't find a solution.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated