enter image description here Handler Hello everyone, I want to make it so that you can edit various entries on the page by sql query R :: exec. And for some reason, I don’t want to work by getting id $ _GET ['id'], if I write for example id = 67 everything works Here’s the code:

if(isset($_POST['save'])) { 

R :: exec ("UPDATE addsub SET title = '$ data [title]', textless = '$ data [textless]', author = '$ data [author]' WHERE id = '$ id'");

}

  • so GET or POST? - Nikita Umnov
  • $ id = $ _GET ['id']; - Egor Orlov
  • See print_r , which is generally obtained in the query string before sending it to R::exec - Nikita Umnov
  • displays just 0 - Egor Orlov
  • print_r("UPDATE addsub SET title='$data[title]', textless='$data[textless]', author='$data[author]' WHERE id='$id'") displays 0? or print_r($d) prints 0? - Nikita Umnov

0