Forum Moderators: coopster
$fj = fopen ("index.js", "w");
while($row = mysql_fetch_array($result))
{
$title=$row[1];
$title=htmlspecialchars($title, ENT_QUOTES);
$id=$row[0];
$stuff="document.write('<http://www.example.com/index.php?post=$id>$title<\/a>')";
fwrite ($fj, "$stuff");
}
fclose ($fj);