Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/17/2020 in all areas

  1. the error is because you are not using an index in the sql query, meaning that it will have to scan through all the data in the table to find rows that satisfy the WHERE clause, and you are just copy/pasting things you see without even reading what they are saying. the MYSQLI_REPORT_ALL value you are using is causing this. if you read the section of the mysqli error report documentation that i posted in one of your threads, you will see what the ALL value does. it includes the MYSQLI_REPORT_INDEX - Report if no index or bad index was used in a query value. it doesn't. all you have done is randomly change the code so that it is no longer executing that query. btw - since you are using exceptions for database statement error handling, none of the discrete error handing logic you have in your code will be executed, and is therefore pointless, since execution transfers to the nearest exception handler, or to php if none. its php that's giving you the current error output.
    1 point
  2. You are not saving then using the statement object returned by prepare. RTFM
    1 point
  3. You don't have any input fields named 'submit', so $_POST['submit'] won't exist. Note: <form> tags are not inputs, giving them a name doesn't make them submit something.
    1 point
  4. Set the values in the php.ini file instead of using ini_set() all the time. That's what it's for. If you have a startup error the code won't even execute, so not of those ini_set()s can happen. Therefore ini_set('dispay_startup_errors', 1) is as much use as a chocolate teapot.
    1 point
  5. The user doesn't input the value on checkboxes or radio buttons <button>s are just another type of html element which allow the programmer to set a value independent of its label. In the example below, the value of the clicked button would be sent in $_POST['gender'] <button name='gender' value='M'>Male</button> <button name='gender' value='F'>Female</button>
    1 point
  6. Your $_POST values do not match what is posted. Try a very simple piece of code from "Debugging 101" echo '<pre>' . print_r($_POST, 1) . '</pre>'; so you can see what is being posted
    1 point
  7. mysqli_stmt_bind_result just returns a bool value, not something you'd use in mysqli_stmt_fetch. You use your $stmt variable there like you did just above. Speaking of the line just above, it shouldn't be there. You don't fetch before your loop.
    1 point
  8. Perhaps you should check for errors when executing your query also.
    1 point
  9. the above is why you are not seeing any errors. those two are not the same. E_ALL is a defined constant. putting quotes around it makes it a string consisting of the characters E, _, A, L, and L.
    1 point
This leaderboard is set to New York/GMT-04: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.