Hye guys,
I really need help .. I manage to submit this value into DB but it only submit one, not all values. Below I attached the example. I had enter dd, 55 but in DB only received 55

Here is what i have done.
I have this html textarea :
<td><textarea class="form-control" name="d3_CA[]"></textarea></td>
Then when I click on submit button this how i handle :
if(isset($_POST['save-report'])){
foreach($_POST['d3_CA'] as $value)
{
$report->d3_CA = $value;
echo $report->d3_CA;
}
}
if($report->registerD3()){
$successMSG ="Success ! Report <span style='color:red;'>"
.$_POST['reportNo']. "</span> has been created. ";
}
else{
$errMSG = "Opps ! problem..";
}
it show correct value when i'm echoing. Then i want to submit it into DB, this what i do :
function registerD3(){
$query2 = "INSERT INTO " . $this->table_d3 . "
SET d3_CA=:d3_CA";
$stmt = $this->conn->prepare($query2);
$stmt->bindParam(":d3_CA", $this->d3_CA);
echo $this->d3_CA;
if($stmt->execute()){
return true;
}
else{
return false;
}
}