Hi,
I believe the problem is with the "implode" I have set. I should really do the implode in my INSERT query.
My variables, availability and interests, are checkboxes. I need to store the information in a table.
First, I tested to see what would happen if I removed the implode. The script worked and inserted the data in the table. But, the result that is in the table does not show the choices that were made. Instead, it shows the "array".
So now, I need to convert my array into a string to store in the table. The data in this table is not going to be used for anything.
I'm trying to use the implode in my insert query but I'm receiving the following message:
Parse error: syntax error, unexpected ',' in C:\Inetpub\fullfocus\AngelHouse\testing.php on line 27.
This error message is coming from this section of code:
$query = "INSERT INTO test (available, interests)
VALUES ('implode(",",$_SESSION[available])', 'implode(",",$_SESSION[interests]'))";
$result = mysql_query ($query) or die (mysql_error());
I know it has to do with my insert statement. I'm trying to research the proper way to write the implode but I'm not having much luck.
Any ideas what I'm doing wrong?