How can I use onclick event in PHP echo? [closed]

  forms, javascript, onclick, php

I’m trying to use onlick in echo PHP, but the event do not work.

echo 
   '<li>
   <form action="home.php" method="post" id="form_home">
   <input type="hidden" value="" name="uid">
   <input type="hidden" value="" name="view">
   <input type="hidden" value="" name="name">
   <input type="hidden" value="" name="country">
   <a onclick="document.getElementById("form_home").submit(); return false;"><span class="material-icons md-light">pie_chart</span>Dashboard</a>
   </form>
   </li>'
;  

Source: Ask PHP

LEAVE A COMMENT