I've tried many combinations but I can't seem to figure out why all the input types become text!
$columnquery = $conn->query("SELECT column_name, column_comment, data_type FROM information_schema.columns
WHERE table_schema = '$dbname'
AND table_name = '$tableName'");
if ($columnquery->num_rows > 0){
while ($columnRows = $columnquery->fetch_assoc()) {
$columnName = $columnRows["column_name"];
$columnType = $columnRows["data_type"];
if ($columnRows['column_comment'] != 'Pups' && $columnType = "varchar"){
echo "$columnName: $columnType <input type='text' name='$columnName'><br>";
}
elseif ($columnRows['column_comment'] != 'Pups' && $columnType = "int") {
echo "$columnName: $columnType <input type='number' name='$columnName'><br>";
}
elseif ($columnRows['column_comment'] != 'Pups' && $columnType = "date") {
echo "$columnName: $columnType <input type='date' name='$columnName'><br>";
}
}