You are on page 1of 1

$result=@mysql_query('SELECT ID, title, song FROM song WHERE ID=$sid');

$row=@mysql_fetch_array($result);
if($row!=NULL)
{
$id=$row['ID'];
$song=$row['song'];
$title=$row['title'];
print("<!---------form--------->");
print("<form action=\"submittedsong.php\" method=\"post\">\n");
print("<p>Edit the artist:<br />\n");
print("Title:<input type=\"text\" name=\"title\" value=\"");
echo($title);
print("\" size=\"20\" /> <br />\n");
print("Song:<input type=\"text\" name=\"song\" value=\"".nl2br($song)."\" /> <br
/>\n");
print("<input type=\"hidden\" name=\"id\" value=\"".$id."\" />\n");
print("<input type=\"submit\" name=\"submit\" value=\"SUBMIT\" /></p>\n");
print("</form>\n");
}
else
{
echo("<p>Couldnot retrieve information from the database.</p>");
}

You might also like