Re: [SMARTY] smarty, php, and mysql
| From: | Ben Curtis | Date: | Sun, 14 Apr 2002 12:40:54 +0000 |
| Subject: | Re: [SMARTY] smarty, php, and mysql | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-3700@lists.php.net to get a copy of this message | ||
Of course you can write your own option-producing function as well.
Check out the build_select function in
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tesly/tesly/inc/functions.php?rev=1.2&content-type=text/vnd.viewcvs-markup
and a template that uses {build_select}:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tesly/tesly/templates/admin/plan_edit.html?rev=1.4&content-type=text/vnd.viewcvs-markup
On Sat, Apr 13, 2002 at 10:04:44PM -0400, Blue Presley wrote:
> For those of you who have been helping me with this I appreciate you comments. However,
> I'm doing everything that you guys are saying and it's not working. Again, I'm
> trying to use my .php script to pull data from a mysql database and then, using smarty, create a
> forms <selection> box. I've followed the smarty manual best I know how, however nothing
> is working. So one more time plz. Instead of giving my code I'll just ask how you do it. If
> there is someone out getting to work, please provide me with the following:
>
> 1. a sample, fully working, php script pulling a few rows from a mysql database and assinging
> to a variable that smarty will recognize.
>
> 2. a .TPL file (just the template code here, of course) that creates an html <selection>
> box using the array elements from the .php script.
>
> I'm sure if I had a working example from which to work, this would not be this
> frustrating. Thanks in advance for your help.
>
> Blue