Re[2]: [SMARTY] html_options bug?

From: Date: Thu, 01 Jan 1970 00:00:00 +0000
Subject: Re[2]: [SMARTY] html_options bug?
References: 1 2  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-3786@lists.php.net to get a copy of this message
I tried your code and it worked just fine to me (http://mccabe.dyn.dhs.org/test/smtest.php) The only thing I changed was adding path to smarty in the require statement and a line like this: $smarty->template_dir = "./"; /l On Tue, 16 Apr 2002 23:35:39 -0500 Monte Ohrt <monte@ispi.net> wrote: > Have you tried the sample script that comes with Smarty? Does it work OK? > > Try different hard-coded values to see if you can get it to compile at > all. I'm not sure what the problem would be, I haven't seen this one > before. > > Monte > > Blue Presley wrote: > > >I wouldn't know a "bug" in a program if it bit me. but I can think of > nothing else since my code seems to have no problems. I'm just trying > to simply make a selection box in a form using {html_options}... > > > >here is my php script: > > > >********************************************** > ><?php > >require('Smarty.class.php'); > > > >$smarty = new Smarty; > >$selection_options = array('eggs', 'bacon', 'ham', > >'grits'); > >$selection_descriptions = array('scrambled', 'crispy', > >'fried', > 'runny'); > >$selected = 'happy'; > > > >$smarty->assign('selection_options' , $selection_options); > >$smarty->assign('selection_descriptions' , $selection_descriptions); > >$smarty->assign('selected' , $selected); > > > > > > > > > >$smarty->display("indexcopy.tpl"); > > ?> > > > >********************************************** > > > > > > > >Here is a copy of my template (indexcopy.tpl) > >*********************************************** > ><html> > ><head> > > <title>Untitled</title> > ></head> > > > ><body> > >How are you today? > ><form action="script.php"> > ><select name="food"> > >{html_options values=$selection_options output=$selection_descriptions > >selected=$selected} > > > ></select> > ></form> > ></body> > ></html> > > > >*********************************************** > > > > > >here is the problem: When the code compiles for webbrowser output, it > stops halfway. Notice how the html stops at the first <select> tag and > nothing is after it. Any ideas why this is happening? > >************************************************* > ><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> > ><html> > ><head> > > <title>Untitled</title> > ></head> > > > ><body> > >How are you today? > ><form action="myscript.php"> > ><select name="mood"> > > > >************************************************* > > > > > >

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