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?
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,
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,