Been struggling with this problem for a while now and I just can't het my brain to understand it.
I have a very simple website where I can add items in a database. There is a list on index.php where the list is displayed and each item needs a url that directs to a "more information" page.
The "more information" page has to be a dynamic one as there are a lot of items and these items can be added or deletend.
What my code for this section looks like at the moment:
$result_set = mysql_query("SELECT id, name FROM items WHERE id = $item");
while ($item = mysql_fetch_row($result_set)) {
$name = $item['name'];
echo "<a href=\"/items/".$item['1'].".html\">$name</a>";
This results in a link if item 1 = wrench ../items/wrench.html.
But this page obviously doesn't excist. How can I get this to work?
"<a href=\"/items/".$item['name'].".html\">$name</a>";