mardi 14 avril 2015

PHP form table contents not displaying

This is part of my code for my PHP POST form:



echo "<form method ='post' action='Information.cgi'>
<tr>
<th>Date</th>
<th>Time</th>
<th>Day Type</th>
</tr>"; //outputs html table

while($record = mysql_fetch_array($data)){
echo "<form method ='post' action='Information.cgi'>";
echo "<tr>";
echo "<td> <input type='firstname' name='FirstName' value =".$record['FirstName']." autofocus required='required'/> </td>";
echo "<td> <input type='surname' name='Surname' value=".$surname['Surname']." autofocus required='required'/></td>";
echo "</tr>";
}

echo "</table>";


Only the following displays when running the code in a browser:



Date Time Day Type

Aucun commentaire:

Enregistrer un commentaire