search

Home  >  Q&A  >  body text

Teacher case'edit': The following code seems to be missing

case'edit':

$id=$_POST['id'];

I repeatedly tested and found that where id='$id'; the $id inside is wrong , because the edit.php form does not submit $id, so you need to re-acquire and set a variable under action.php.

Finally got it done. I don't know if there is another way I got it wrong.

  2546 days ago1254

reply all(2)I'll reply

  • 电动小老虎

    电动小老虎2017-12-17 00:18:30

    Is such that. That id is passed through a hidden field

    <input name='id' value="{$user_info.id}">

    Then you inject the object in the controller $request->param() can obtain all request objects.

    reply
    0
  • PHP中文网

    PHP中文网2017-12-09 20:04:27

    like

    reply
    2
  • Cancelreply