This is how I write to the database:

$stmt = $mysqli->prepare("INSERT INTO horoscope(oven, telec, blizneci, rak, lev, deva, vesi, scorpion, strelec, kozerog, vodoley) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);"); $stmt->bind_param('sssssssssss',$oventodaytext, $telectodaytext, $bliznetcitodaytext, $raktodaytext, $levtodaytext, $devatodaytext, $vesitodaytext, $scorpiontodaytext, $strelectodaytext, $kozerogtodaytext, $vodoleytodaytext); $stmt->execute(); $mysqli->close(); 

But nothing is recorded ... I checked through echo, everything is fine, but the database is empty) Maybe there is a problem with hosting (using 000webhost)? If you transfer 10 values ​​in one line, then everything works:

 $stmt = $mysqli->prepare("INSERT INTO horoscope(oven, telec, blizneci, rak, lev, deva, vesi, scorpion, strelec, kozerog) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?);"); $stmt->bind_param('ssssssssss',$oventodaytext, $telectodaytext, $bliznetcitodaytext, $raktodaytext, $levtodaytext, $devatodaytext, $vesitodaytext, $scorpiontodaytext, $strelectodaytext, $kozerogtodaytext); $stmt->execute(); $mysqli->close(); , $ oventodaytext, $ telectodaytext, $ bliznetcitodaytext, $ raktodaytext, $ levtodaytext, $ devatodaytext, $ vesitodaytext, $ scorpiontodaytext, $ strelectodaytext, $ kozerogtodaytext); $stmt = $mysqli->prepare("INSERT INTO horoscope(oven, telec, blizneci, rak, lev, deva, vesi, scorpion, strelec, kozerog) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?);"); $stmt->bind_param('ssssssssss',$oventodaytext, $telectodaytext, $bliznetcitodaytext, $raktodaytext, $levtodaytext, $devatodaytext, $vesitodaytext, $scorpiontodaytext, $strelectodaytext, $kozerogtodaytext); $stmt->execute(); $mysqli->close(); 

It is necessary to write down only the eleventh parameter - nothing is recorded already ...

Made a check for errors using the proposed code, that's what got out:

 execute() failed: Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline. 

This is how the table was created:

enter image description here

  • one
    Why does anyone write such topics never post an error, what does mysqli, mysql, PDO say? - ArchDemon
  • one
    @ArchDemon no errors are displayed ... Just in the database is empty and everything - Alex777Ch
  • one
    Do you have the contents of 11 variables do not accidentally exceed the maximum allowable packet size (max_allowed_packet) !? - Visman
  • one
    you need to check for an error and display it like this php.net/manual/ru/mysqli.error.php example stackoverflow.com/questions/2552545/… - Jean-Claude
  • @Visman may well be. Each string variable contains about 700 characters. And what to do if exceeds? - Alex777Ch

0