to dump a table, try this, works for me
$result = mysql_query("SELECT * FROM $tbl_name");
$h=0;
while($h < mysql_num_rows($result)) {
empty($outstr);
$z=mysql_fetch_row($result);
$f=0;
while($f < mysql_num_fields($result)) { $out[$f] = $z[$f]; $f++; }
$outstr = "INSERT INTO $tbl_name VALUES ("; for ($x=0;$x<count($out);$x++) { $outstr.="'$out[$x]'"; if ($x != count($out) -1) { $outstr.=", "; } else {$outstr.=")"; } }
$outstr .= "\n";
echo "$outstr<br>";
$h++;
}
}
}