I have a set of values that were put into a form and am now using this to put into a database. this is my error:
"Warning: implode() [function.implod e]: Bad arguments. in /home/xxxxxx/public_html/login.php on line 177
Couldn't execute insert query."
[PHP]
$today = date("Y-m-d");
$fields_str = implode(",",$fi elds);
$values_str = implode('","',$ values); <=line 177
$fields_str .=",createdate" ;
$values_str .='"'.",".'"'.$ today;
$fields_str .=",password" ;
$values_str .= '"'.","."md5"." ('".$password." ')";
$sql = "INSERT INTO member ";
$sql .= "(".$fields_str .")";
$sql .= " VALUES ";
$sql .= "(".'"'.$values _str.")";
$result = mysql_query($sq l,$con)
or die("Couldn't execute insert query.");
$_SESSION['auth']="yes";
$_SESSION['logname'] = $loginname;
[/PHP]
"Warning: implode() [function.implod e]: Bad arguments. in /home/xxxxxx/public_html/login.php on line 177
Couldn't execute insert query."
[PHP]
$today = date("Y-m-d");
$fields_str = implode(",",$fi elds);
$values_str = implode('","',$ values); <=line 177
$fields_str .=",createdate" ;
$values_str .='"'.",".'"'.$ today;
$fields_str .=",password" ;
$values_str .= '"'.","."md5"." ('".$password." ')";
$sql = "INSERT INTO member ";
$sql .= "(".$fields_str .")";
$sql .= " VALUES ";
$sql .= "(".'"'.$values _str.")";
$result = mysql_query($sq l,$con)
or die("Couldn't execute insert query.");
$_SESSION['auth']="yes";
$_SESSION['logname'] = $loginname;
[/PHP]
Comment