www.webdeveloper.com
Results 1 to 4 of 4

Thread: About the Amount and ID.

  1. #1
    Join Date
    Oct 2012
    Location
    istanbul
    Posts
    64

    About the Amount and ID.

    Hello,

    How do you get of product IDs AND amounts?

    See sample screen:
    http://o1307.hizliresim.com/1c/9/q213x.png

    as an array

    Thanks in advance
    Attached Images Attached Images
    Last edited by Adem; 07-09-2013 at 07:55 AM.

  2. #2
    Join Date
    Oct 2012
    Location
    istanbul
    Posts
    64
    The sample code
    PHP Code:

    <div class="maxi-div">
          <?php
          
    while ($row $ayristiricilar->fetch_assoc()) {
          
    ?>
          <div class="body"><?=$row['product_name']?></div><div class="body"><input type="text" name="diplexer" value="<?=$row['id']?>" size="10"></div>
          <?php
          
    }
          
    ?>
    </div>

  3. #3
    Join Date
    Jul 2013
    Posts
    11
    I do not exactly understand what you would like to do. You have these product information already; you like to display them on a webform and you like to update these info from there?

  4. #4
    Join Date
    Oct 2012
    Location
    istanbul
    Posts
    64
    I'm sorry, I do not know English

    I just need some help here

    PHP Code:
    <div class="maxi-div">
          <?php
          
    while ($row $ayristiricilar->fetch_assoc()) {
          
    ?>
          <div class="body"><?=$row['product_name']?></div><div class="body"><input type="text" name="diplexer[]" value="<?=$row['id']?>" size="10"></div>
          <?php
          
    }
          
    ?>
    </div>

    According to this table should be the div?
    PHP Code:
        foreach ($_SESSION['table'] as $id => $data){
            if (
    $_POST['diplexer'] == $id 1){
                foreach (
    $data as  $value){
                    
    $splitter explode('+'$value);
                    
    $selected_product_ids[] = $splitter[0];
                    
    $selected_product_amounts[] = $splitter[1];
                }
            }
        } 
    Last edited by Adem; 07-09-2013 at 05:17 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles