I want to fetch data from a mysql table using php. Please, can anyone tell me what is wrong with this code? What is the correct code to fetch data from a mysql database:
Code:
while ($rows = mysql_fetch_array($query)): $name = $rows['Name']; $address = $rows['Address']; $email = $rows['Email']; $subject = $rows['Subject']; $comment = $rows['Comment'] echo "$name$address$email$subject$comment"; endwhile;