原始:

   1: <input type="image" value="v1" src="image/query_ma.png">
   2: <input type="image"  value="v2" src="image/query_hr.png">

 

做法1:
增加name 為辨識基礎

   1: <input type="image" name="q1" value="v1" src="image/query_ma.png">
   2: <input type="image" name="q2" value="v2" src="image/query_hr.png">

判讀:
使用isset 判斷q1 不是有值,即可知是否點擊,若有,其值為 "v1"(value)

   1: isset($_POST['q1'])
arrow
arrow
    文章標籤
    php image button
    全站熱搜

    jason0324 發表在 痞客邦 留言(0) 人氣()