insert checkbox values into database within a separate column of the query separated by commas
<p>I need help for this problem that I've been trying to solve for a while (I'm new in PHP). I have a form with several checkboxes whose values are pulled from a specific table of the database. I managed to display them in the form,  but cannot insert their values into the table connected to that specific page since there is ony one column.I want to enter all the selected values of the checkbox into that single column separated by commas.</p>

<p>Here's the code:</p>

<pre><code>url &lt;BR&gt;&lt;?php $query  = "SELECT url FROM webmeasurements";
$result = mysql_query($query); 
while($row = mysql_fetch_row($result)) 
{     $url  = $row[0];    
echo "&lt;input type=\"checkbox\" name=\"url\" value=\"$row[0]\" /&gt;$row[0]&lt;br /&gt;";
$checkbox_values = implode(';', $_POST['url']);   }  
?&gt; 

&lt;input type="submit" name="Submit" value="Submit"&gt; 
&lt;/form&gt; 
&lt;?php

if(isset($_POST['url']))
{  echo $url;
 foreach ($_POST['url'] as $statename)
 {
   $url=implode(',',$statename)
  }
}
$q="insert into table (url) values ($url)";
?&gt;
</code></pre>
