|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
terra Smarty Rookie
Joined: 27 Jul 2011 Posts: 26
|
Posted: Sun Apr 21, 2013 1:31 pm Post subject: Not work in template |
|
|
hi,
why not work in template? help-me, please
in php
Code: |
if ($acao == "alterar")
{
$quant = $_POST['qtd'];
if (is_array($quant))
{
foreach($quant as $cod => $qtd)
{
if(is_numeric($cod) && is_numeric($qtd))
{
$sql_alterar = "UPDATE tbl_carrinho SET qtd = '$qtd' WHERE cod = '$cod' AND sessao = '".session_id()."'";
$rs_alterar = mysql_query($sql_alterar);
}
}
}
}
|
in tpl
Code: | <input type"text" size="2" name="qtd[{$i.cod}]" value="{$i.qtd}" /> |
thanks |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|