Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Some debugging steps that might help: 1) Make sure the form is actually being submitted to the script, using a statement at the top that looks like if (count($_POST) > 0) exit('form submitted'); </p> <p>If that fails, then your form isn't ever hitting the script. Make sure that your tag attributes are correct in the HTML page.</p> <p>2) Add these lines before you build the SQL statement: exit( print_r( $_POST, 1 ) );</p> <p>Make sure that the POST super global contains the data that you input into the form fields.</p> <p>Presumably, one of these two steps will reveal your issue. If not, then try this: At the top of your page, do: phpinfo(); exit(); </p> <p>Load that up in a web browser, and do a page search for "mysqli," and ensure that your php installation supports mysqli.</p> <p>If you do have mysqli, and things still aren't working, make sure that you don't have a column in your table that is set to NOT NULL and doesn't have a default value associated with it. If that is the case, you will have to include this field in your query, or change it to have a default value.</p> <p>PS. You really shouldn't inject raw user data into an SQL query. If you have mysqli support, use prepared statements instead. They might seem a bit alien at first, but once you get used to them, you'll never go back.</p> <p>PPS. Instead of using the functionally oriented approach to mysqli, use the object orientated interface instead. It is a bit more friendly, and IMO, easier to debug.</p> <p>PPPS. If all of this fails, get the last error from the database.</p> <p>Cheers</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload