473,466 Members | 1,405 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

when i submit my dynamic rows ( suppose add 3 rows) values then "sub_brand_name " s

9 New Member
Expand|Select|Wrap|Line Numbers
  1. when i submit my dynamic rows ( suppose add 3 rows) values then  "sub_brand_name "  save correctly and other fields save same values more time.
  2. how can I solve this problem?
  3.  
  4.  
  5. here is my code:
  6.  
  7.  
  8.  
  9. <?php
  10.  
  11. if (isset($_POST['title']) && sizeof($_POST['title']) > 0) {
  12.     $title = array_map('trim', $_POST['title']);
  13.     foreach($title as $title) {
  14. }
  15. if (isset($_POST['start_time']) && sizeof($_POST['start_time']) > 0) {
  16.     $start_time = array_map('trim', $_POST['start_time']);
  17.     foreach($start_time as $start_time) {
  18.     }
  19. if (isset($_POST['end_time']) && sizeof($_POST['end_time']) > 0) {
  20.     $end_time = array_map('trim', $_POST['end_time']);
  21.     foreach($end_time as $end_time) {
  22.   }
  23. if (isset($_POST['peak_offpeak']) && sizeof($_POST['peak_offpeak']) > 0) {
  24.     $peak_offpeak = array_map('trim', $_POST['peak_offpeak']);
  25.     foreach($peak_offpeak as $peak_offpeak) {
  26.   }
  27. if (isset($_POST['program_name']) && sizeof($_POST['program_name']) > 0) {
  28.     $program_name = array_map('trim', $_POST['program_name']);
  29.     foreach($program_name as $program_name) {
  30.   }
  31. if (isset($_POST['product_name']) && sizeof($_POST['product_name']) > 0) {
  32.     $product_name = array_map('trim', $_POST['product_name']);
  33.     foreach($product_name as $product_name) {
  34.   }
  35. if (isset($_POST['sponsor']) && sizeof($_POST['sponsor']) > 0) {
  36.     $sponsor = array_map('trim', $_POST['sponsor']);
  37.     foreach($sponsor as $sponsor) {
  38.   }
  39. if (isset($_POST['sub_brand_name']) && sizeof($_POST['sub_brand_name']) > 0) {
  40.     $sub_brand_name = array_map('trim', $_POST['sub_brand_name']);
  41.     foreach($sub_brand_name as $sub_brand_name) {
  42.  
  43.  
  44.  
  45.  
  46.  mysql_query("INSERT INTO entry_history (date,channel_name,title,start_time,end_time,peak_offpeak,product_name,program_name,sponsor,sub_brand_name) VALUES ('$date','$channel_name','$title','$start_time','$end_time','$peak_offpeak','$product_name','$program_name','$sponsor','$sub_brand_name')");
  47.        }
  48.        }
  49.        }
  50.        }
  51.        }
  52.        }
  53.        }
  54.        }    
  55.        }
  56.  else {
  57.     exit('No values entered');
  58. }
  59. header('location:entry_history.php');
  60.  
  61. ?>
  62.  
  63.  
  64. On Sun, May 29, 2016 at 3:38 PM, nur muhammad helal <nurmuhammad.helal@gmail.com> wrote:
  65. amar kaj onekti a rokom...............
  66.  
  67. On Sun, May 29, 2016 at 3:36 PM, nur muhammad helal <nurmuhammad.helal@gmail.com> wrote:
  68. http://www.thaicreate.com/php/forum/048745.html
  69.  
  70.  
  71.  
  72.  
  73. jalal ai code a ki problems? parle aktu check kore bolo.
  74.  
  75. On Thu, May 5, 2016 at 11:40 AM, nur muhammad helal <nurmuhammad.helal@gmail.com> wrote:
  76. vi amar problem to save nia . dynamic rows to add remove hossilo but save korte parsina. thanks
  77.  
  78. On Wed, May 4, 2016 at 5:03 PM, Shah Jalal <mdjalal2012@gmail.com> wrote:
  79. see the url and get implement it in your site 
  80. http://jsfiddle.net/7AeDQ/
  81.  
  82. -- 
  83. Thanks
  84. Shahjalal
  85. phone:+8801680954856
  86. E-mail:mdjalal2012@gmail.com
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
Jun 18 '16 #1
0 1609

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: sukh | last post by:
From the table i want everything highlighted with a * I wanted an SQl expression to look at values in Column 1 (ID), look at the corresponding values in the second column (F1) and select the row...
2
by: Maggie Eusebio Schock | last post by:
Hi, I would like to understand when a selected cell, selected row or selected rows in the DataGrid control ends up on the clipboard. All I know is that the selection ends up on the clipboard,...
3
by: daveland | last post by:
I am working on some JavaScript that dynamically adds rows to a table in response to a button click. A new row does appear on the screen when the button is clicked. However, that table to which a...
1
by: bobby1041 | last post by:
Hi All! I am trying to make several fields in a HTML form validated, but only when a dynamic checkbox is selected. I am not sure how to do this. Here is a snippet of the dynamic checkbox...
1
by: joozeq | last post by:
Hi Is there any way to script a table (with EM or Management studio) along with data contained in the table (rows values)? J
4
by: ankurmaheshwari | last post by:
hii all How to make 2-d array in java when no of rows are not known let me know if u have the solution 4 it... Regards ankur maheshwari
4
by: muhammadrashidmughal | last post by:
columns f1 f2 f2 f4 f5 f6 f7 f8 ...... 1 2 3 4 ...
9
TheSmileyCoder
by: TheSmileyCoder | last post by:
This is one of those questions I fear will never be answered, but I have to give it a go. I use an excel spreadsheet (built from Access) to export our review Comments. All of the columns are...
2
by: helalreza | last post by:
i have some dynamic rows, when i submit a single row submit into my database. how can i insert my dynamic all rows into database by submit? entry_history.php (page)
0
by: helalreza | last post by:
My javaScript. <script language="javascript" type="text/javascript"> var i=0; function addRow(table1) { i++; frm.reza.value=i; var tbl = document.getElementById('table1');
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.