-3

i have on line 150..

$sql = "UPDATE " . TABLEP . " SET alt='$_POST[alt]', text='$_POST[text]', nadpis='$_POST[nadpis]', datum='$_POST'datum', odkaz='$_POST[odkaz]', urltext='$_POST[urltext]' WHERE id = " . $_GET["edit"];

Please help

user3783243
  • 5,368
  • 5
  • 22
  • 41

1 Answers1

-1

Here's your problem: datum='$_POST'datum'. You forgot to add the brackets.

Cosmin
  • 864
  • 3
  • 16
  • 34
  • there is much more wrong he mixes GEt with POST and this is the basis if his problem one of them must be NULL also TABLEP should be $TABLEP and even more, besides sql injection – nbk Dec 20 '20 at 20:22
  • @nbk `$_GET` and `$_POST` can be mixed just fine - HTTP requests can have both a query string and a body. TABLEP could also be a constant. The issue here is with the missing brackets (though SQL injection is also definitely a problem). – iainn Dec 20 '20 at 20:28
  • 1
    @nbk, I was addressing _only_ the issue that OP has mentioned. Of course the code is wrong on many levels. – Cosmin Dec 20 '20 at 20:29