ดึงข้อมูลจาก data แต่ถ้าข้อมูลมีเว้นวรรค จะแสดงเฉพาะข้อมูลก่อนเว้นวรรค ส่วนข้างหลังเว้นวรรคหายไปไม่ยอมแสดง
<?php
$name = "<center><font size = 9><I><body bgcolor = \"#119922\" text = \"#993311\"></center></I><br>";
$id_product = $_REQUEST['id_product'];
$conn = mysql_connect("localhost","root","mysql");
$query = "use project";
$result = mysql_query($query) or die ("Query failed");
$query = "select * from product where id_product = '$id_product'";
$result = mysql_query($query) or die ("Query failed");
echo"<form action = up_product.php?id_product=$id_product method=post>";
$row = mysql_fetch_array($result);
echo"Edit product<br>";
echo"รหัสสินค้า : <input type = text name = id_product value = $row[id_product]><br>";
echo"ชื่อสินค้า : <input type = text name = name_product value = $row[name_product] ><br>";
echo"ราคา : <input type = text name = price value = $row[price] ><br>";
echo"จำนวนสินค้า : <input type = text name = balance value = $row[balance] >";
echo"<p><input type = submit name = submit value = Submit>";
echo"<input type = reset name = reset value = Cancel>";
echo"</form>";
echo $name;
echo "<br><a href = \"list_product.php\">HOME</a>";
mysql_close($conn);
?>