<?php $query ="DELETE FROM goods WHERE id = 'id'";?><h2>Удалить модель?</h2><formmethod='POST'><inputtype='hidden'name='id'value='$id'/><inputtype='submit'value='Удалить'></form>";
А в контроллере такой:
public function actionDelete($id)
{
$goods = Goods::find()->one();
return $this->render('delete', compact('goods'));
}
В итоге выводит вот :
Bad Request (#400)
Unable to verify your data submission.
The above error occurred while the Web server was processing your request.
Please contact us if you think this is a server error. Thank you.
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Актуальные контакты:
Telegram: @Nikker_web
E-Mail: tarasevich.email@gmail.com
Портфолио https://www.behance.net/d4d4186e
Разрабатываю дизайн групп в соц сетях, сайтов, приложений, другой дизайн под заказ
Актуальные контакты:
Telegram: @Nikker_web
E-Mail: tarasevich.email@gmail.com
Разрабатываю дизайн групп в соц сетях, сайтов, приложений, другой дизайн под заказ
Портфолио https://www.behance.net/d4d4186e
Question
Sirex0011
Код в delete.php такой:
А в контроллере такой:
public function actionDelete($id) { $goods = Goods::find()->one(); return $this->render('delete', compact('goods')); }
В итоге выводит вот :
Bad Request (#400)
Unable to verify your data submission.
The above error occurred while the Web server was processing your request.
Please contact us if you think this is a server error. Thank you.
В чем моя ошибка?
Link to comment
Share on other sites
0 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.