Hi there,
I have a system the loads some Lesson’s from a MySQL database and then displays them as links on a web page. When a link is pressed it is supposed to goto a new page containing information about the lesson that was clicked.
I have most things working except for being able to distinguish between the lesson numbers with the links.
[CODE]
<xsl:for-each select=”lesson”>
<tr>
<td style=”text-indent:10px”>
<a href=’readDB.php?lesson=2′> <xsl:value-of select=’title’ /></a>
</td>
</tr>
</xsl:for-each>
Above is the bit of code I am having troubles with. Where the link is currently hardcoded to look for lesson=2, I would like to make it so it loads those up automatically. So it would change the lesson=x to whatever the lesson number in, 1 through to x. Similar to how a for loop would work in a desktop programming language.
I have tried to embed PHP code into this XSL stylesheet but it doesn’t seem to work due to being processed on the client and PHP is processed on the server.
Does anyone know how to dynamically increment a variable in XSLT or is there a way to embed PHP into this stylesheet?