Updating Array PLease HELP ME
Please I need Help . I want to update array in the database separated by ","
I exploded it and show the results by $test[0] , $test[1] , $test[2] . in the smarty desgin because each part should be apear alone .
This is the code for inserting in the data base ;
function appreg($name, $email, $pass, $test){
$test = utility::input_array($test);
// 'utility' is another function which i exploded
$sql = "INSERT INTO `thistable` ( `id` , `name` , `email` , `pass` ,`test`) VALUES (NULL , '$name', '$email', MD5('$pass'), '$test) ";
if(mysql_query($sql) == true)return true;else return false;
Then I exploeded in another function by this way .
$r[test] = explode(",", $row[test]);
I show the results correctly . ans separated as i want .But when i trying to update it by the following way . there is nothing updated .
function modify_userdata($name,$email,$test){
There is a condiotion and the first 2 variabled updated without ant problem because not arrays but $test is array then the sql
$sql = "UPDATE `{thistable}` SET `name` = '{$name}',`email` = '{$email}',`test` = '{$test} WHERE `id` = $userid ;";
So if any one know to fix this problem please help