Displaying function results : Revisited & Simplified
Posted: Fri Jul 01, 2005 9:37 pm
Hi All,
I didn't get any response from my previous post so I thought i'd simplify things.
Can anyone tell me why the results, in this case, 'echo "RESULTS"' is being displayed above the search button?
tia, will.
I didn't get any response from my previous post so I thought i'd simplify things.
Can anyone tell me why the results, in this case, 'echo "RESULTS"' is being displayed above the search button?
tia, will.
Code: Select all
<?
if (isset($_POST['searchNow'])) {fnSearchResults();}
function fnSearchResults() {
echo "RESULTS";
}
function viewSearch() {
echo "<form method=\"post\" action=\"".$_SERVER['PHP_SELF']."\">\n";
echo "<input type=\"submit\" name=\"searchNow\" class=\"btn\" value=\"Search Now\">";
}
viewSearch();
?>