Re: Cant set info in DB...HELP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



kvigor wrote:
$insert_query = "INSERT INTO contestants (conName, conAddress, conCity, conState,

conZip, conPhone, schName, schAddress, schCity, schState, schZip, strName, strCity,

strState) VALUES('$regName', '$regAddress', '$regCity', '$regState', '$regZip',

'$regPhone', '$sclName', '$sclName', '$sclCity', '$sclState', '$sclZip', '$stoName',

'$stoCity', '$stoState')";

mysqli_query($connection,$insert_query); ?>

1) You need to use mysqli_real_escape_string on the vars you're putting into the SQL statement.

2) You need to check the return value from mysqli_query to see if the query failed. If it is failing I'm guessing actioning suggestion 1 might help.

-Stut

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux