Export HTML table to MySQL

Viewed 6667

Let's say I have an HTML table.

<html>
<body>
<table border="1">
<tr>
<th>Username</th>
<th>Password</th>
</tr>
<tr>
<td>User_1</td>
<td>Password_1</td>
</tr>
<tr>
<td>User_2</td>
<td>Password_2</td>
</tr>
</table>
</body>
</html>

I need a script that creates the COLUMNS in the TH tag to a MySQL table, and then inserts the data that's in the TD tag. How to do that?

1 Answers
Related