implode() function ?? insert into field?
Posted: Wed Jan 30, 2008 12:18 pm
***** PLEASE USE THE
.................................................................................................... ...
these are the methods and query
but
the printout is like that " Committee: (Array) "
i just want to see the checkbox values in the editor field and HTML table:)
help me plss
Code: Select all
TAG *****[/color]Code: Select all
<input type="checkbox" name="committee[]" value="ijh" /> Inter
<input type="checkbox" name="committee[]" value="pwa" /> Proced1
<input type="checkbox" name="committee[]" value="ijc" /> Inter2these are the methods and query
Code: Select all
$committee = $_POST['committee'];
$arr=array($committee);
$text = implode("),(", $arr);
$query="INSERT INTO editor(editor) VALUES ('({$text})')";
$result = mysql_query($query) or die ("query not made");Code: Select all
$data1 = mysql_query("SELECT * FROM editor where editor_id={$info['user_id']} ") or die(mysql_error());
while($info1 = mysql_fetch_array($data1)){
Print "<th>Committee:</th> <td>{$info1['editor'] } </td>";}i just want to see the checkbox values in the editor field and HTML table:)
help me plss