0

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..
Thanks

2
Contributors
5
Replies
6
Views
5 Years
Discussion Span
Last Post by xuweisen
0

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

<?php
						echo "<ul>";
							$query="SELECT name FROM equipment_category ORDER BY id";
							$result=mysql_query($query,$connection);

							if(mysql_num_rows($result)>0){
								while($row=mysql_fetch_assoc($result)){
									echo "<li class='childmenu'><a href=#equipment?id='".$row['id']."'>".$row['name']."</a></li>";
								}
								mysql_free_result($result);
							}
						echo "</ul>";
					?>

Edited by xuweisen: n/a

1

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

SELECT id, name FROM equipment_category ORDER BY id
Votes + Comments
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.. :)

Edited by xuweisen: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.