RhoIsWar1096 All American 3857 Posts user info edit post |
So I'm working on a website and having some strange errors showing up:
Quote : | " Warning: implode() [function.implode]: Bad arguments. in /home/strattap/public_html/bottomsup/admin/createuser.php on line 166
Warning: implode() [function.implode]: Bad arguments. in /home/strattap/public_html/bottomsup/admin/createuser.php on line 167 Couldn't execute insert query. " |
Here are the original statements:
Quote : | " $fields_str = implode(",",$fields); $values_str = implode('","',$values); " |
And here's what I found about implode: http://us.php.net/implode
Any suggestions?12/26/2007 6:13:00 PM |
BigMan157 no u 103354 Posts user info edit post |
are you sure the $fields and $values arrays exist? 12/26/2007 7:47:59 PM |
Noen All American 31346 Posts user info edit post |
yeup ^ is right. You are getting bad data in your string functions. you need to do some data checking before calling implode, especially boundary conditions (null strings, escaping characters) 12/26/2007 7:53:38 PM |
RhoIsWar1096 All American 3857 Posts user info edit post |
Ya know, I had a sneaking suspicion that was it... I guess I should just make sure the array has index >= 2 before imploding it? 12/26/2007 9:56:33 PM |