u have quotes inside quotes without isolating the variable with a period. this example encases the variable in single quotes. double quotes are used to close the string and attach the variable.
PHP Code:
<?
include("includes/head.php");
$result=mysql_query("select * from images where artist_name ='".$inartist."'");
?>