This code was given to me by a friend and works perfectly, however in my system it Array to string conversion in C:\wamp\www\web2\database.php on line 90 and on line 91
function edit($table, $id)
{
$query = "SELECT DISTINCT `COLUMN_NAME`
FROM `INFORMATION_SCHEMA`.`COLUMNS`
WHERE `TABLE_NAME` = '$table'";
echo "<form method='post' action=''>";
$header = $this->dbLocalhost->query($query);
foreach($header as $data) {
echo "<p>";
90. echo "".$data.": ";
91. echo "<input type='text' name=".$data." />";
echo "</p>";
}
echo "<input type='submit' name='Insert' />";
echo "</form>";
}
sorry to ask, as I have the irritating feeling its very simple. Thanks