How to call php snippet which is save as basic page? I have a php code as below:

$("#tbMGroup tr.odd").click(function() {
              $("#m_id").val($(this).attr("m_id"));
              $("#form1").first().attr("action", "search.php");
              $("#form1").submit();
            });


but,
I have add search.php to a basic page. now, these code need to call search.php when mouse click, I don't know how to call search.php snippet, because search.php now is not a independent file, it is a snippet.
Thanks for your help...
I think you should use hook_menu to define the path the drupal way and rewrite your form using drupal FAPI. This gives you a clean system.