Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Ok, so here is the deal, What I can see in your script are the following concerns:</p> <p>First, try to make the connection as follows:</p> <pre><code>mysql_connect($host, $username, $password) </code></pre> <p>(remove the " from the variables).</p> <p>Second, I see you are inserting a new register to the database, And I could not see any "id" column, is your database table working with an index? Do you have an auto increment value? If yes, You should format your SQL as follows:</p> <pre><code>"INSERT INTO orders_mysql(id, name, lastname, address, address2, city, state, zip, country, phone, bra_size, bra_color, cami_size, cami_color, email)VALUES(NULL, '$name', '$lastname', '$address' '$address2', '$city', '$state', '$zip', '$country', '$phone', '$bra_size', '$bra_color', '$cami_size', '$cami_color', '$email')"; </code></pre> <p>Other thing that you could try in order to tackle down your problem, would be as follows: Copy your SQL statement and replace the variables with real values, just write randon words, something like:</p> <pre><code>"INSERT INTO orders_mysql(name, lastname, address, address2, city, state, zip, country, phone, bra_size, bra_color, cami_size, cami_color, email)VALUES('asd', 'asd', 'asd' 'asd', 'asd', 'asd', 'asd', 'asd', 'asd', 'asd', 'asd', asd', 'asd', 'asd')"; </code></pre> <p>having this, using phpMyAdmin, paste the SQL statement in your database SQL Query box and try to add it, this will give you an error or a success, and if it's an error, you will get the description on why your statement is failing.</p> <p>Other thing that ussually makes statements fail, is that you have to add the "´" to the column names:</p> <pre><code>"INSERT INTO orders_mysql(´name´, ´lastname´, ´address´, ´address2´, ´city´, ´state´, ´zip´, ´country´, ´phone´, ´bra_size´, ´bra_color´, ´cami_size´, ´cami_color´, ´email´)VALUES('$name', '$lastname', '$address' '$address2', '$city', '$state', '$zip', '$country', '$phone', '$bra_size', '$bra_color', '$cami_size', '$cami_color', '$email')"; </code></pre> <p>Lets try any of these options and keep us updated with the errors you get in order to try to solve this with some more info.</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. VO
      singulars
      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