•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 423,655 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,136 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 1715 | Replies: 1
•
•
Join Date: Jan 2005
Posts: 3
Reputation:
Rep Power: 0
Solved Threads: 0
Morning all,
I don't know how to solve this problem Here it is:
In form html
Result: qty value: 1
When I change qty to 0, 1, 2, 3, 4, etc.. gross value stay ar 20.45.
What is wrong in my code ?
Regards to all.
I don't know how to solve this problem Here it is:
•
•
•
•
$price_unit = "20.45"
$qty = 'qty';
$net = 'net';
$net = $qty * $price_unit ;
as: 0<$qty<10 to parse in a textbox.
I do that :
if
($qty =0)
{
$net =0;
}
elseif
($qty =1) {
$net = $price_unit * 1;
}
elseif
($qty = 2) {
$net = $price_unit * 2;
}
....
else{echo "Message...."}
•
•
•
•
.....
<input type = "text" name = "qty" value = "<?php echo $qty ?>" size = "6">
<input type = "text" name = "gross" value = "$qty * $price_unit" size = "6">
Result: qty value: 1
When I change qty to 0, 1, 2, 3, 4, etc.. gross value stay ar 20.45.
What is wrong in my code ?
Regards to all.
•
•
•
•
•
•
•
•
DaniWeb PHP Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Similar Threads
- Parsing html form. (PHP)
- parsing error (XML file-java-schema) (Java)
- Parsing an atom feed (PHP)
- File parsing in 'C' (C)
Other Threads in the PHP Forum
- Previous Thread: embedding java script in php
- Next Thread: Seeting up and calling variables stored in sessions



Threaded Mode