I have a database table called 'partners'. I want to echo this table into a html/php table which has 5 columns id, channel, email, paypal, and network. I also wan't a form that adds new people to the table through the website.
<?php
mysql_connect("localhost", "mysql_user", "mysql_password"); //your parameters here
mysql_select_db("mydb"); //you DB name here
$q = "SELECT id, channel, email, paypal, network FROM partners;";
$result = mysql_query($q);
echo "<table>";
echo "<tr><td>id</td><td>channel</td><td>email</td><td>paypal</td><td>network </td></tr>";
while ($row = mysql_fetch_array($result, MYSQL_NUM)) {
echo "<tr>";
echo "<td>".$row[0]."</td>";
echo "<td>".$row[1]."</td>";
echo "<td>".$row[2]."</td>";
echo "<td>".$row[3]."</td>";
echo "<td>".$row[4]."</td>";
echo "</tr>";
}
echo "</table>";
mysql_free_result($result);