Determining Button used to Submit with PHP

后端 未结 2 1401
庸人自扰
庸人自扰 2021-01-26 09:10

I am creating a management engine that needs to manage sections and then pages within the sections.

For usability it has been decided that the display order fields will

2条回答
  •  醉梦人生
    2021-01-26 09:24

    I have gone ahead and accepted the answer that assisted me in resolving the issue, however in the off chance that others read and want to better understand the final outcome, this is the code that was used:

    Button Code:

    
    

    Determining the button used (Debug Testing Only!):

    if($_POST['reorder'] == "sections"){ echo 'DEBUGGER ACTIVATED: SUBMITTED SECTIONS FOR RE-ORDER';  }
    if(substr($_POST['reorder'], 0, 6) == "pages:"){ echo 'DEBUGGER ACTIVATED: SUBMITTED PAGES FOR RE-ORDER FOR SECTION #'.substr($_POST['reorder'], 6);  }
    

提交回复
热议问题