Hello All, Im sure this is a very simple task but i have only been learning PHP for roughly 3 days and this seems to be beyond me. I have currently created a page which allows me to upload data and images to a mysql database and then i created another page which shows the data. At present there are 3 records in the database but only the 2nd and 3rd are showing? I have looked around online but i am struggling with the solution and would be grateful for any help. Be gentle with me if ive made any obvious mistakes.
[php]<?php
require(“db_con.php”);
$selected = mysql_select_db(“chaletpa_personals”,$dbhandle)
or die(“Could not select personals”);
//execute the SQL query and return records
$query = “SELECT * FROM details”;
$result = mysql_query($query) or die(“Could not select from table”);
?>[/php]
The above is shown before the tag and the below is used in the section
[php]<?php
//fetch tha data from the database
while ($row = mysql_fetch_array($result)) {
echo
"
Name | Age | Telephone No. | Sex | Image | |
---|---|---|---|---|---|
” . $row[‘name’] . “ | ”;” . $row[‘age’] . “ | ”;” . $row[‘email’] . “ | ”;” . $row[‘tel’] . “ | ”;” . $row[‘sex’] . “ | ”;<img src=“customer_images/”. $row[‘image’] .”"/> | ";
}
//close the connection
mysql_close($dbhandle);
?>[/php]
Sorry again for any obvious mistakes