Display PHP within HTML values

If the function returns a printed value:

<a href="https://wordpress.stackexchange.com/questions/145222/<?php bloginfo("url'); ?>">Link</a>

If not (using the echo statement):

<a href="https://wordpress.stackexchange.com/questions/145222/<?php echo get_stylesheet_directory_uri(); ?>">Link</a>

You can also use print() as part of a more complex expression where echo cannot.

By the contrary, when you want to use HTML into PHP, I recommend to close PHP and open it again after the HTML code, instead of using echo "<a href="#"></a>"; like this example:

<?php my_function() { ?>
    <a href="https://wordpress.stackexchange.com/questions/145222/<?php bloginfo("url'); ?>">Link</a>
<?php } ?>

Your PHP code is ok, but probably the function returns an empty value. Also, close the INPUT tag with />.