I am new here and i want to ask a simple question to all of you as i am a beginner in PHP. I have created a table in MySQL database with 4 columns named id , stuimg , stuname , studetail. also i have created a page through which values and image gets stored into these columns. Now my problem is that how can i retrieve all these information stored in these columns and display it on a page (Including Image)
you can check my code and please correct if i am doing something wrong:
<html>
<body>
<form action="" method="post">
<table>
<?php
$p=$_GET['id'];
include('dbconfig.php');
$query = "SELECT * FROM aboutstudent where id ='$p'";
$result = mysql_query($query);
while ($data = mysql_fetch_array($result))
{
?>
<tr>
<td>Image*:</td>
<td><input name="image" type="file" value="<?php echo $_FILES['image']['name'];?>" /> </td>
</tr>
<tr>
<td>Name*:</td>
<td><input name="name" type="text" value="<?php echo $data['name'];?>" /> </td>
</tr>
<tr>
<td>Description*:</td>
<td><input name="des" type="textarea" value="<?php echo $data['description'];?>" /> </td>
</tr>
<?php } ?>
</table>
</form>
</body>