Why the following code can't redirect to another page?
echo("<A HREF=\"trading.php\"><input type=\"image\" src=\"arrow1.gif\" name=\"trade\" value=\"".$rec["symbol"]."\"></A>");
because an input image is always a submit button so it would only work if its in a <form> and than not as normal link but as action submitter like
<form action="trading.php"> <input type="image" src="pic_src"> </form>
You can also do like this:
echo "<a href=\"trading.php\"><img src=\"arrow1.gif\"></a>";
echo("<input type=\"image\" src=\"arrow1.gif\" name=\"trade\" value=\"".$rec["symbol"]."\" onclick=\"location.href='trading.php';return false;\">");