You did two things wrong here. You never closed the final quote for the style tag, and using single quotes for both style='' and the url('') cancelled each other out.
I'd recommend always using double quotes for HTML tags.
while($row = mysql_fetch_array($data))
//Echo Theme Template on pages
{
echo "<div style=\"background-image:url('../uploads/avi/{$row['avi']}');\"></div>";
echo "<div class='myname'>{$me}</div>";
}
Another thing to consider, always say "View Source" instead of "Inspect" with Firebug or some other tool. The reason you didn't see the URL printed out is because new browsers are "Smart" and try to fix DOM errors. Inspecting the source with Firebug or a similar tool will show you what the browser actually interprets. Viewing the source will show what was actually sent to the browser.
/
? Because nothing you've posted would be in any way responsible for removing forward slashes./
doesn't need to be escape afaik, unless it's part of html and not an attribute.