Inserting php array data into mysql isn't working -


Hi, I have an array $ name [] that I am trying to include in the other area of ​​my desk but it is not working

  $ username = "us"; $ Password = "pw"; $ Database = "db"; Mysql_connect (local host, $ user name, $ password); @ Mascil_sact_db ($ database) or die ("error"); $ I = =; While ($ i & lt; 5) {$ query = "Include table values ​​('', '$ name [i]', '', '')"; Mysql_query ($ query); $ I ++} mysql_close ();  

Any thoughts please? Thank you

You used $ instead of i For the key of $ name then try:

  "Insert table values ​​('' '. $ Name [$ i].' ', Insert in the table values ​​('', ''. Mysql_real_escape_string ($ name [$ i]), '', '', '', '') ""  
  ',' ') " 

Comments

Popular posts from this blog

MySql variables and php -

url rewriting - How to implement the returnurl like SO in PHP? -

Which Python client library should I use for CouchdB? -