/    Sign up×
Community /Pin to ProfileBookmark

About the Amount and ID.

Hello,

How do you get of product IDs AND amounts?

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

as an array

Thanks in advance

[canned-message]attachments-removed-during-migration[/canned-message]

to post a comment
PHP

3 Comments(s)

Copy linkTweet thisAlerts:
@AdemauthorJul 09.2013 — The sample code
[code=php]

<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>

[/code]
Copy linkTweet thisAlerts:
@schaetJul 09.2013 — 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?
Copy linkTweet thisAlerts:
@AdemauthorJul 09.2013 — I'm sorry, I do not know English

I just need some help here

[code=php]
<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>
[/code]



According to this table should be the div?
[code=php]
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];
}
}
}
[/code]
×

Success!

Help @Adem spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...