troubleshooting Question

PHP form textarea array submission

Avatar of Shamsul Kamal
Shamsul Kamal asked on
PHPMySQL ServerHTML
11 Comments2 Solutions670 ViewsLast Modified:
Hi,

I would like to request an assistant.

I have the following textarea form , which is generated as array by php :

<textarea name='remark[]' id=$invoiceid cols='10' rows='1'>
</textarea>
<input type='submit' value='Go' name='SubmitRemark'>


I use the following PHP scripts to record :


if(isset($_POST['SubmitRemark'])){
$textareaarray=$_POST['remark'];
$invoiceid=$_POST['invoiceid'];
foreach($textareaarray as $textarea) {
$sql=mysql_query("UPDATE domainorder SET remark='$textarea', datepaid=NOW() WHERE invoiceid='$invoiceid' " , $conn);
if($sql){echo "<p><font face='Arial'><b>Domain DB Updated</b></font></p>";}}}


It seems the above php script not able to capture the post data and not record in the mysql.

Can anybody help to check and provide the complete new php scripts to handle textarea array ?

Appreciates anybody assistant.


Thank you.

ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 2 Answers and 11 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 11 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros