URL id パラメータを使用してデータベースからデータを取得する作業を行っています。私はsyntax error
同じに直面しています。誰でもこのコードの問題点を教えてください。
<?php
$con = mysql_connect("localhost","root","");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
$per = $_GET['id'];
$query = mysql_query("select * from dynamic_data where id=".$_GET['id']");
while($row = mysql_fetch_array($query))
{
echo "<label>" . $row['name'] . "</label>";
echo "<label>" . $row['desc'] . "</label>";
echo "<label>" . $row['cell'] . "</label>";
}
?>