I want to show all the names of my tb_app which is currently have (4)names stored and show it on my textboxes...can anyone help me make my code work? I'm just a beginner at programming.
current code:
<html>
<head>
<title>test</title>
</head>
<body>
<?php
include('include/connect.php');
$sql = "SELECT name FROM tb_app";
while($rows = mysql_fetch_array($sql)){
$name = $rows['name'];
}
?>
Name List: <br />
<input type="text" value="<?php echo $name[0] ?>" /> <br />
<input type="text" value="<?php echo $name[1] ?>" /> <br />
<input type="text" value="<?php echo $name[2] ?>" /> <br />
<input type="text" value="<?php echo $name[3] ?>" /> <br />
</body>
</html>