• Notice regarding image hosts and attachments. See here.

insert characters into db from array.

Associate
Joined
4 Mar 2007
Posts
315
Location
United Kingdom
Ok so I got the inserting working with all numerical inputs, however I come across a problem which I cannot work out for myself,

Any suggestions?

PHP:
if(is_array($string)){
					$columns = $this->implodeCol($string);
					$values = $this->implodeVal($string);
					echo $columns. " : ".$values."<br />";
					foreach($string as $k => $v){
						mysql_query("UPDATE $table SET $k = $v WHERE username = 'mikey'");
					}
				}

if I echo the $columns, and $values arrays respectively, it shows the inputs such as "name" respective to "mike", "age" respective to "20",

However. If i try and update the table. The database will put a NULL For the name and only put in the numerical values. Any clues?

Regards,
 
Back
Top Bottom