this my new syntax for my new website

echo "<li class='childmenu'><a href=#equipment?id='".$row['id']."'>".$row['name']."</a></li>";

and this is the old one for my another website

$isi .= "<li><b><a class='topikMenu' href=reset/survey.php?id=".$row['kodetopik']."><span title='".$row['jumlahpenyurvey']." surveyor'>".$row['namatopik']."</span></a></b>";

I think it's same concept about give the $row in the middle of html syntax, but I don't know why my new syntax is error at <a href=#equipment?id='".$row."'>, the $row cannot read by php.. but that <li> can display at web, but the link just #equipment?id=''.. it's blank T_T

Please for your advice..

Recommended Answers

All 5 Replies

could it be the version of mysql that I use? because that two syntax I made with different version of mysql.. :(

This is the whole syntax

						echo "<ul>";
							$query="SELECT name FROM equipment_category ORDER BY id";

									echo "<li class='childmenu'><a href=#equipment?id='".$row['id']."'>".$row['name']."</a></li>";
						echo "</ul>";

id is missing from your query, so it has no value. Use:

SELECT id, name FROM equipment_category ORDER BY id
commented: thank you +0

waaaaaa.. thanks very much.. oh God.. I think this is the foolest question, I'm not clearly read my syntax.. really really sorry and thanks.. :)

Please mark this thread solved.

ok.. thanks pritaeas.. :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.