SQL statement/php

Closed
no_one - Updated on Mar 23, 2018 at 04:51 PM
 Blocked Profile - Mar 23, 2018 at 03:53 PM
i got an unidentified index error in this line 6 and 7 please help

<?php if( ! defined( 'ACCESS' ) ) die( 'DIRECT ACCESS NOT ALLOWED' ); ?>
<?php

if( isset( $_POST ) ) {

$name = $_POST[ 'name' ];
$id = $_POST[ 'id' ];

if( $DB->query( "UPDATE products SET name='$name' WHERE id=$id" ) ) {
$MESSAGE = "Product successfully updated!";
$MESSAGE_TYPE = "info";
} else {
$MESSAGE = "Failed to update Product";
$MESSAGE_TYPE = "danger";
}

}

1 response

Blocked Profile
Mar 23, 2018 at 03:28 PM
Get onto the SQL server, and issue the same QUERY with the same login credentials to see if it errors out.
the sql in the server is correct but, in the web it still got an unidentified index
Blocked Profile
Mar 23, 2018 at 03:53 PM
What credentials do the web server use to connect?