Undefined variable [closed]

As the error states, your $my variable is not defined.

The reason behind it is that you only defines $my when $the_query->have_posts().

Adding

$my = 'No results found';

right after

$the_query = new WP_Query( $args );

would solve your problem. $my would then be redefined if results are found.

File not found.