Liam Delahunty: Home Tips Web Contact
Recommended laptop
under £500
.

Think I deserve a present? See my Amazon Wish List


$query = "SHOW COLUMNS FROM table_name ";
$result = mysql_query($query, $connection);
while ($myrow = mysql_fetch_row($result)) {
$cols[] = $myrow[0];
}

$query = "SELECT * FROM table_name";
$result = mysql_query($query, $connection);
while ($data = mysql_fetch_row($result)) {
for ($i=0; $i < count($cols); $i++) {
$colNames = $cols[$i];

print ("print ("");
print ("<tr><td>");
print ("$colNames");
print ("</td>");
print ("<td>");
print ("<input type=\"text\" name=\"$colNames\" value=\"$$colNames\">");
print ("</td>");
print ("</tr>");
print ("\\n");");
print ("
");
}
}

Share this!  



Php Convert Url To Link | Php Create Simple Form From Db | Php Design Random Image Generator


 

  Tips | Home | Search | Contact

Link here: