Warning: mysqli_fetch_assoc() expects parameter 1 to be mysqli_result, boolean given in W:\domains\testphp\database_insert.php on line 47
PHP:
скопировать код в буфер обмена
скопировать код в буфер обмена
- <?PHP
- $dbhost = "localhost";
- $dbuser = "root";
- $dbpass = "";
- $dbname = "widget_corp";
- );
- }
- ?>
- <?PHP
- $menu_name = "Edit me";
- $position = 4;
- $visible = 1;
- $query = "InSERT INTO subjects (menu_name, position, visible) VALUES ('{$menu_name}', {$position}, {$visible})";
- if ($result){
- echo "Success";
- }
- else{
- }
- ?>
- <html>
- <head>
- <meta charset="utf-8">
- <title>Databases</title>
- </head>
- <body>
- <?PHP
- ?>
- <li><?PHP echo $subject['menu_name']; ?></li>
- <?PHP
- }
- ?>
- </body>
- </html>
- <?PHP
- ?>