Avatar of Nathan Riley
Nathan Riley
Flag for United States of America

asked on 

Form Insert Array Help PHP/HTML

I'm having issues trying to insert a form as it needs to loop.  I need to loop the submit to insert all of the instances of my form fields.


HTML
<form method="post" action="submit.php">
<input type="text" name="duedate[]"/>
<input type="text" name="update[]"/>

<input type="text" name="duedate[]"/>
<input type="text" name="update[]"/>

<input type="text" name="duedate[]"/>
<input type="text" name="update[]"/>

<input type="submit"/>
</form>

Open in new window


$duedate = $_POST['duedate'];
$update = $_POST['update'];

$result=mysql_query("insert into daily_emails_history (duedate,update)
                            select duedate,update
                            from daily_emails_project");

Open in new window

PHPHTML

Avatar of undefined
Last Comment
Ray Paseur

8/22/2022 - Mon