PHP, MySQL HTML error in result -
hello i'm new , i'm trying make simple dynamic html. have written following code seems dose not work. can me. because following line
$row[name]"); echo (""); echo (""); echo (""); echo (""); } ?>
<html> <head> <title>untitled document</title> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> </head> <body> <table> <tr> <td align="center">edit data</td> </tr> <tr> <td> <table border="1"> <? mysql_connect("localhost","user","pass"); mysql_select_db("computers"); $order = "select * vnc"; $result = mysql_query($order); while ($row=mysql_fetch_array($result)){ echo ("<td>$row[name]</td>"); echo ("<td>$row[department]</td>"); echo ("<td>$row[phone]</td>"); echo ("<td>$row[ip]</td>"); echo ("<td><a href="edit_form.php?id=$row[id]">edit</a></td></tr>"); } ?> </table> </td> </tr> </table> </body> </html>
thank in advance
i'm not sure why used parenthesis, you're looking similar this:
echo "<td>" . $row[name] . "</td>";
anything written inside quotations displayed explicitly, why have end quotes, add period, give array, followed period , opening quotes.
the
Comments
Post a Comment