I\'m trying to place the output of this PHP SQL query into a database table, but it is outputting all of the row data into one column.
if(isset($_POST[\'subm
The problem is that you're outputting a Technically, you don't need to concatenate Also, you're not supposed to have a Note also, that the MySQL extension is deprecated and no longer maintained. You should be using MySQLi or PDO these days. tag for every row and column. You need to move the tags since they are optional in HTML.
outside the inner loop.
"{$value}" with the other two strings, but you really should pass $value through htmlspecialchars() to avoid producing incorrect HTML if the value contains any < or & characters. Eg:while ($row = mysql_fetch_row($result)) {
print '';
foreach ($row as $value) {
$v = htmlspecialchars ($value);
print " \n";
}
$v ";
}
echo " element between table rows, which is why I replaced it with a newline above. Personally, I would skip the closing and