 |

ATTRIBUTES HASH - A list of tag attributes
| Source: |
<define strip balanced tag="db">
<database name="mydatabase" user="myusername" password="mysecretpassword" type="mysql" <%attributes>><$caller.body></database>
<if test="<$database.error> != ''">
<table border="1" bgcolor="#ff0000">
<td>Database Error</td>
<td><%database></td>
</table>
</if>
</define>
<db query="SELECT * FROM favoritecolors">
<#name>, <#favoritecolor><br>
</db>
|
| Output: |
|
Now you don't have to enter the login, host and password every time, and if there's an error, it will be reported.
|
|
 |