Jump to content


New Members
  • Content Count

  • Joined

  • Last visited

Everything posted by LDS

  1. @cyberRobot Thank you all fixed now, Kindly delete last post "Update 3: DB" can't find a way to delete it, thanks for fixing the arrya dictation error on the topic too.
  2. Update 2: Solved it: if (isset($_POST["quantity"])) { foreach ($_POST["quantity"] as $key => $value) { if ( $value > 0) { echo "quan:".$_POST['quantity'][$key]." ".$_POST['productName'][$key]."=".$_POST['product_Price'][$key]."<br>"; } } } I'll Keep it open till I finish the DB then I ll mark it as solved, thanks a lot.
  3. Update: I ve reverted back to my initial coding implementing the suggested array in the name. $i=1; while ($row_sql_Item = mysqli_fetch_assoc($res_sql_Item) AND $i <= $num_rows) { if(isset($_POST['quantity'])){$quantity=$_POST['quantity'][$i];}else{$quantity= "0";} echo "<input type='number' min='0' max='10' name=\"quantity[$i]\" value='".$quantity."' onclick=\"this.parentNode.querySelector('input[type=number]').stepDown();this.form.submit();\" class='productQuantity' readonly>";
  4. Hello cyberRobot, Thanks for the reply "Regarding the XSS I agree just did not post everything about it... the read only just for design purpose and this is for personal use but I have implemented the security measures for this." I added the id to the quantity section as suggested it s better yet still stuck as the value after that input is submitted . <input type='number' min='0' max='10' name='quantity[]' value='"; if(isset($_POST['quantity']) && is_array($_POST['quantity'])){ $quantitiez = array($_POST['quantity']); foreach ($
  5. Hello, Have the following form that takes data from the DB when u click on the text the left input increments when u click on it the same input decrement its value. Have 2 main issues now: 1- the value of the input fields needs to be set after the post is submitted and having issue with that since it's an array. 2-after the submit the post is saved in an array (the out is showing in the attched image), need to choose each related item , price and quantity like product 1 price 1 quantity 1 so i can update the db later on. All the Best <form method='POST' action='
  • 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.