i have a prob to insert the data that i've select from the mysql database into the textbox in php..

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>New Doctor Record</title>
</head>

<body bgcolor="#FFFFFF" text="#000000">
<p>&nbsp;</p>
<?php
$host = "localhost";
$uname = "root";
$pass = "1234";
$database = "klinik_kucing";
$tablename = "Doctor";
$con = mysql_connect($host, $uname, $pass)
	or die ("Database connection failed!<br>");
$result = mysql_select_db($database)
	or die ("Database could not be selected");
$query = "Update Doctor set DocName = \"".$DocName."\",Address = \"".$Address."\",Postcode = \"".$Postcode."\",City = \"".$City."\",State = \"".$State."\",PhoneNum = \"".$PhoneNum."\",DateJoin = \"".$DateJoin."\" where DocID =\"".$DocID."\"";
$result = mysql_query ($query);
if (!$result)
{
	die ("Query could not be executed.<br>");
}
else
{
	echo "<table border = \"0\" align = \*center\* cellspacing = \"1\" cellpadding = \"5\" width = \"300\">";
	echo "<tr>";
	echo "<td colspan = \"2\" bgcolor = \"#dddddd\">";
	echo "<center><b>".mysql_affected_rows()." record updated succesfully</b></center>";
	echo "</td>";
	echo "</tr>";
	echo "<tr bgcolor = \"#eeeeee\">";
	echo "<td width = \"200\" bgcolor = \*#eeeeee\*>";
	echo "<div align = \"right\">Name:</div>";
	echo "</td>";
	echo "<td width = \"200\">".$DocName."</td>";
	echo "</tr>";
	echo "<tr bgcolor = \"#eeeeee\">";
	echo "<td width = \"200\" bgcolor = \*#eeeeee\*>";
	echo "<div align = \"right\">Address:</div>";
	echo "</td>";
	echo "<td width = \"200\">".$Address."</td>";
	echo "</tr>";
	echo "<tr bgcolor = \"#eeeeee\">";
	echo "<td width = \"200\" bgcolor = \"$eeeeee\">";
	echo "<div align = \"right\">Postcode:</div>";
	echo "</td>";
	echo "<td width = \"200\">".$PostCode."</td>";
	echo "</tr>";
	echo "<tr bgcolor = \"#eeeeee\">";
	echo "<td width = \"200\" bgcolor = \*#eeeeee\*>";
	echo "<div align = \"right\">City:</div>";
	echo "</td>";
	echo "<td width = \"200\">".$City."</td>";
	echo "</tr>";
	//echo "<tr>";
	echo "<tr bgcolor = \"#eeeeee\">";
	echo "<td width = \"200\" bgcolor = \*#eeeeee\*>";
	echo "<div align = \"right\">State:</div>";
	echo "</td>";
	echo "<td width = \"200\">".$State."</td>";
	echo "</tr>";
	echo "<tr bgcolor = \"#eeeeee\">";
	echo "<td width = \"200\" bgcolor = \*#eeeeee\*>";
	echo "<div align = \"right\">Gender:</div>";
	echo "</td>";
	echo "<td width = \"200\">".$Gender."</td>";
	echo "</tr>";
	echo "<tr bgcolor = \"#eeeeee\">";
	echo "<td width = \"200\" bgcolor = \*#eeeeee\*>";
	echo "<div align = \"right\">Phone Number:</div>";
	echo "</td>";
	echo "<td width = \"200\">".$PhoneNum."</td>";
	echo "</tr>";
	echo "<tr bgcolor = \"#eeeeee\">";
	echo "<td width = \"200\" bgcolor = \*#eeeeee\*>";
	echo "<div align = \"right\">Date Join:</div>";
	echo "</td>";
	echo "<td width = \"200\">".$DateJoin."</td>";
	echo "</tr>";
	echo "<tr>";
	echo "<td colspan = \"2\" bgcolor = \"#dddddd\">&nbsp;</td>";
	echo "</tr>";
	echo "</table>";
}
?>

</body>
</html>

someone can help me please....=(

The variables (like $DocName) are probably all empty. I don't see code giving them a value.

Be a part of the DaniWeb community

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