Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/28/2022 in all areas

  1. does the browser goto appr.php with a valid id=xxx on the end of the url? btw - you should be using a post method form when performing an action on the server. also, when learning, developing, and debugging code/query(ies), you should display all php errors. error_reporting should always be set to E_ALL and display_errors should be set to ON, preferably in the php.ini on your system. by setting error_reporting to zero in your code, php won't help you find problems that it detects. you should always have error handling for statements that can fail. for database statement that can fail - connection, query, prepare, and execute, the simplest way of adding error handling, without adding code at each statement, is to use exceptions for errors and in most cases let php catch the exception, where php will use its error related settings (see the above paragraph) to control what happens with the actual error information (database statement errors will 'automatically' get displayed/logged the same as php errors.) to enable exceptions for errors for the mysqli extension, add the following line of code before the point where you make the database connection - mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT); next, you should always trim, then validate inputs before using them. if a required input doesn't exist, that's an error and you should setup a message for the user and not attempt to run any code that must have the input. you should not put external, unknown, dynamic values directly into an sql query statement. use a prepared query instead. you would also want to switch to the much simpler PDO database extension. ids in the html document must be unique. if you are not using any particular id at all, simply leave it out of the markup. you should validate your html markup at validator.w3.org
    1 point
This leaderboard is set to New York/GMT-05:00
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.