Re: [SMARTY] Smarty error on PHP include

From: Date: Thu, 21 Nov 2002 14:24:12 +0000
Subject: Re: [SMARTY] Smarty error on PHP include
References: 1 2  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-6492@lists.php.net to get a copy of this message
On a side note, I'd recommend keeping PHP out of the templates. Use {include_php} instead. Monte On Thu, 2002-11-21 at 07:17, Sonny2@gmx.de wrote: > > This is incorrect. Use {} or place variable outside the quotes: > > > > > > value=\"".$row['account_code']."\">${row['account_name']}</option>\n"; > > > > > > value=\"".$row['account_code']."\">".$row['account_name']."</option>\n" > > Ok I have changed it now to: > echo "<option > value=\"${row[account_code]}\">${row[account_name]}</option>\n"; > > But the next error is not very understandable as well! > Fatal error: Smarty: [in search_casedata.tpl line 25]: syntax error: invalid > attribute name - '/www-1/src/php/lib/php/Smarty_Compiler.class.php on line > 1398 > > Line 25 is: > > 24: $sql = "SELECT account_name,account_code FROM account WHERE > account_locked='0' ORDER BY account_name"; > 25: $query = $db->sql_query($sql); > 26: while ( $row = $db->sql_fetchrow($query) ) { > 27: ..... and so on > > Thanks in forward. > > Peter > > -- > +++ GMX - Mail, Messaging & more http://www.gmx.net +++ > NEU: Mit GMX ins Internet. Rund um die Uhr für 1 ct/ Min. surfen! -- Monte Ohrt <monte@ispi.net>

« previous php.smarty.general (#6492) next »