PHP get values from another page

后端 未结 2 1709
天命终不由人
天命终不由人 2021-01-25 17:51

I have this page admin_inquiry.php(page1) which has a dynamic table that shows rows of records.I want to get the values from 2 columns, ContactNo, and message. The contactno col

2条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-25 18:11

    Approach 1 :

    Use the POST method to submit the form. That way, you can query the Message element, pertaining the Contact No., depending on what name or Id you have given to the elements. (you have not given any yet).

    Approach 2 :

    Set the href property of the contact No. element dynamically, using, say jQuery. Set the action attribute to a URL that includes both the ContactNo and Message as URL parameters. That way you can access the message also from the GET array just as you are doing with the Contact No. (Note : Not sure if long texts like message can be passed on as URL parameters, depends on the length, and may be security issues).

提交回复
热议问题