Jump to content

mynameisjayson

New Members
  • Posts

    3
  • Joined

  • Last visited

mynameisjayson's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. but i have a correct index from each you suggest. <script type="text/javascript"> var rowNum = 0; function addRow(frm) { rowNum ++; var row = '<p id="rowNum'+rowNum+'"><input type="text" class="form-control" name = "from_branch[]"style = "width:250px;" placeholder="From" value="" required> <input type="text" id="from_2" class="form-control" placeholder="To" style = "width:250px;margin-top:-34px; margin-left:280px;" name = "to_branch[]" value="" required> <input type="text" class="form-control" placeholder="#"style = "width:80px;margin-top:-34px; margin-left:560px;" name = "quantity[]" value="" required> <input type = "checkbox" name = "prio_color[]" value = "#d6f4ca#fd3236" style = "position:absolute;width:80px; margin-top:-23px; margin-left:620px;"> <button type="button" value="Remove" class="btn btn-default" style = "width:40px; margin-top:-57px; margin-left:680px;"onclick="removeRow('+rowNum+');"><span class = "glyphicon glyphicon-minus"></button></p>'; jQuery('#itemRows').append(row); } function removeRow(rnum) { jQuery('#rowNum'+rnum).remove(); } </script>
  2. so, do you have any idea how, to resolve this.. actually its work to insert but the problem is the prio_color is not working properly, i mean is not inserting in a correct row.
  3. Hi I am having undefined offset:2 and any body can give me an idea, why i get this error message. for($i = 0; $i< count($from_branch) || $i< count($to_branch) || $i< count($quantity) || $i< count($prio_color); $i++) { $query = mysql_query("INSERT INTO pull_out(`description`,`barcode`,`from`,`to`,quantity,prio_color,date_created,remarks,userid) VALUES('$desc','$barc','$from_branch[$i]','$to_branch[$i]','$quantity[$i]','$prio_color[$i]','$datec','$remar','$userid')"); } and i use checkbox under prio_color and i think this is the cause,
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.