Re: [SMARTY] html_options bug?

From: Date: Wed, 17 Apr 2002 04:35:39 +0000
Subject: Re: [SMARTY] html_options bug?
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-3785@lists.php.net to get a copy of this message
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 (#3785) next »