hdogg Posted April 6, 2007 Share Posted April 6, 2007 Submit Multiple Records using PHP IMPOSSIBLE??? Hi... I've been having a hard time trying to get php to submit multiple records. First Off... This following form works perfectly when I try to insert multiple rows of one field type - forecast[]. However, I want to submit both - forecast[] and month[] form fields. HTML Form <input type=text name=forecast[] value=$forecast> <input type=text name=month[] value=$forecast><BR> <input type=text name=forecast[] value=$forecast> <input type=text name=month[] value=$forecast><BR> <input type=text name=forecast[] value=$forecast> <input type=text name=month[] value=$forecast><BR> <input type=submit> Process Form (for one field type) <?php foreach ($_POST['forecast'] as $row=>$name) { $monthperiod = "" . $day_oracle[$month] . "-" . $month_oracle[$month] . "-" . '0'. $year; $forecast = $name; $query_insert_batch = oci_parse($c, "INSERT INTO FORECAST_INPUT(FORECAST) VALUES ('$name')"); oci_execute($query_insert_batch); ?> -Hyrum Link to comment https://forums.phpfreaks.com/topic/45888-submit-multiple-records-using-php-impossible/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.