PHP Code:
<?php include("idnum.php"); include("dbconn.php"); if ($pword==$insertpasswordhere) { 
$result mysql_query("select * from queue");
while (
$row mysql_fetch_assoc($result)) {

$sname=stripslashes($row["sname"]); $semail=stripslashes($row["semail"]); $artist=stripslashes($row["artist"]); $lartist=stripslashes($row["lartist"]); $title=stripslashes($row["title"]); $bwith=stripslashes($row["bwith"]); $lyrics=stripslashes($row["lyrics"]); $sdate=stripslashes($row["sdate"]); $sid++;

$blargh mysql_query("insert into lyrics (sname, semail, artist, lartist, title, bwith, lyrics, sdate, sid) values ('$sname', '$semail', '$artist', '$lartist', '$title', '$bwith', '$lyrics', '$sdate', '$sid')");

}

$handle fopen("idnum.php"'w');
fputs($handle"<?php \$sid=$sid; \$qid=$qid; ?>");
fclose($handle);

$result mysql_query("delete * from queue");
} else { echo 
"Incorrect password."; } ?>
I'm guessing that the $blargh query is failing. But what am I doing wrong?