its a simple enough form, uses method="post" the issue is that i have several text inputs that need to all submit to "customer_comments" but when i name them all "customer_comments" only the final one ends up being seen in the database. im trying to do php to handle it but there seems to be issues
Multiple form fields to one database column
6
its a simple enough form, uses method="post"
the issue is that i have several text inputs that need to all submit to "customer_comments" but when i name them all "customer_comments" only the final one ends up being seen in the database.
im trying to do php to handle it but there seems to be issues
<?
$customer_comment = "";
foreach($_POST['customer_comment'] as $value)
{
$customer_comment .= $value . ", ";
}
$customer_comment = substr($customer_comment, 0, -2); //to get rid of the final ", "
echo $customer_comment;
?>
right now, instead of posting customer comment,customer comment, customer comment it's just posting "Array"
the issue is that i have several text inputs that need to all submit to "customer_comments" but when i name them all "customer_comments" only the final one ends up being seen in the database.
im trying to do php to handle it but there seems to be issues
<?
$customer_comment = "";
foreach($_POST['customer_comment'] as $value)
{
$customer_comment .= $value . ", ";
}
$customer_comment = substr($customer_comment, 0, -2); //to get rid of the final ", "
echo $customer_comment;
?>
right now, instead of posting customer comment,customer comment, customer comment it's just posting "Array"
- MarkLL
- [ 1 ] Thanks
- otfromtot
- SteveSRS
- [ 1 ] Thanks
- boilingstocks
- [ 1 ] Thanks
Next Topics on Trending Feed
-
6