[CODE]
<input name=”db” type=”text” readonly=”readonly” value=”<?php echo $_SESSION[‘SESS_USERNAME’] ;?>”>
From the code above, it will read a username in the database, and then display it in a textbox. I have no problem with this part. Now, i want to make a query that will display all the information from ‘car’ table in the database based on the same username. For example, is my username is ‘[COLOR=”Red”]admin[COLOR=”Red”]admin
[CODE]
$query = “SELECT car.plat, car.cc, car.type, car.trans “.
“FROM car “.
“WHERE car.u_name='[COLOR=”Red”]admin[/COLOR]'”;
$result = mysql_query($query) or die(mysql_error());
echo “<center><table border=’1′>
<tr>
<th>PLAT NUMBER</th>
<th>CAR TYPE</th>
<th>CAR CC</th>
<th>TRANSMISSION</th>
</tr>”;
// Print out the contents of each row into a table
while($row = mysql_fetch_array($result))
{
echo “<tr>”;
echo “<td>” . $row[‘plat’] . “</td>”;
echo “<td>” . $row[‘type’] . “</td>”;
echo “<td>” . $row[‘cc’] . “</td>”;
echo “<td>” . $row[‘trans’] . “</td>”;
echo “</tr>”;
}
$result = mysql_query($query) or die(mysql_error());
echo “</table></center>”;
::my problem now is, what must i replace in the ‘[COLOR=”Red”]admin