The code is mean't to connect to my database. It did work but recently stopped working, I've tried reading the error code shown below but I can't seem to fix it. Here is the unworking code:
<?php
mysql_connect("127.0.0.1", "goaerox_lkdb1", "~censored~"); //your parameters here
mysql_select_db("goaerox_lkdb1"); //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><td>Actions</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);
?>
Now you have seen that, you should have a better understanding on what it is meant to do. This is the current error I am getting:
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in public_html/test.php on line 10
id Channel Email PayPal Network Actions
Warning: mysql_free_result() expects parameter 1 to be resource, boolean given in public_html/test.php on line 21
If anyone could please help me this will be much appreciated.