Can someone please explain why this function doesnt work ? I take it out of the function and leave it as normal code and its fine.
The error I get is
"Warning: Supplied argument is not a valid MySQL-Link resource in ,..."
Any help is greatly appricated.
Function PrintPoll ( $table )
{
$result = mysql_query("SELECT * FROM $table",$db);
while ($myrow = mysql_fetch_row($result))
{
print "$myrow[1]";
}
}
$db = mysql_connect(host, user, password);
mysql_select_db("ngl",$db);
PrintPoll( TableName );