";
if (strlen($artist) == 0) $errorstring .= "You must specify the artist.
";
if (strlen($track) == 0) $errorstring .= "You must specify the track.
";
if (strlen($lyrics) == 0) $errorstring .= "You must specify the lyrics.
";
if (strlen($youremail) < 9 || strlen($youremail) > 64) $errorstring .= "Please enter a valid email address.
";
else
{
$emailtail = strstr($youremail, '@');
if (!strstr($youremail, '@') || !strstr($emailtail, '.')) $errorstring .= "Please enter a valid email address.
";
}
if (strlen($errorstring) == 0)
{
$ip = GetHostByName($REMOTE_ADDR);
$lyrics = nl2br($lyrics);
$lyrics = mysql_real_escape_string($lyrics);
$insert = mysql_query("INSERT INTO pendinglyrics (artist, track, album, lyrics, email, ip, dateadded) VALUES ('" . formatField($artist) . "', '" . formatField($track) . "', '" . formatField($album) . "', '" . $lyrics . "', '" . formatField($youremail) . "', '" . $ip . "', NOW())");
if ($insert)
{
$showform = false;
mail($site_email, "New lyrics pending on " . $site_name, "There are new lyrics pending on " . $site_name . ". Please go to the following url to approve/decline the submission:\n\n" . $site_path . "admin/\n\nRegards,\nAdmin");
}
}
}
?>
|
Submit Lyrics Use the following form to submit new lyrics to . Please use the search feature first to make sure the lyrics do not exist alreay. Your lyrics have been sent for approval and should appear on the site in 24 hours. Thanks again for your contribution to " . $site_name . ". submit more lyrics home"; ?> |