Hi friends i am working for an shopping cart using php script, i placed a drop down option to display currency rate as per user selection(INR and USD). By default it will display all the price in INR, if any user select USD, then it has to show all the values in USD.I dont know how to display the USD live rates. can any one please help to resove the issue.

Member Avatar
Member Avatar
+0 forum 8

Hi - I am having an issue and can't seem to get my head around it. I am trying to calculate GBP from EUR - which should be easy but for some reason my returned value is always a few GBP more than it should be, yet I do the same calculation on my calculator or Google and it's right. Can anyone see what I am doing wrong? I have this: $rate = 1.20881; //var_dump shows float, tried different combos too $euro = 74; //var_dump shows float $gbp = ($euro / $rate); //should give me 61.21 but it keeps giving …

Member Avatar
Member Avatar
+0 forum 2

Hi I'm having an issue echo out the `euro currency` sign with the price converted base on the `$exchange_rate = 0.7746;` Here is my code: <?php $currency = true; $format = '&euro; %2f'; $exchange_rate = 0.7746; function currency_valve($data) { $price = $data[1]; $cpercent = $data[2]; $cvalve = isset ($_GLOBALS['currency']) && $_GLOBALS['currency']; $amount = ($cvalve ) ? $price * (1 + $cpercent / 100) : $price; return sprintf($GLOBALS['format'], $amount / $GLOBALS['exchange_rate']); } $data = "This Mango Cheesecake costs {amount: 11.95} "."and the Raspberry Cheesecake costs {amount: 13.95}.\n"; echo preg_replace_callback ('/\{amount\:\ ([0-9.]+)\ \%([0-9.]+)\%\}/','currency_valve',$data); ?> When I echo it: `This Mango Cheesecake costs …

Member Avatar
Member Avatar
+0 forum 17

Hello I am having trouble converting a long (cents) into currency format. My Code: l long doublePayment = 1099; //Should equal $10.99 DecimalFormat dFormat = new DecimalFormat(); String formattedString = dFormat.format(doublePayment); System.out.println(formattedString); Output: 1,099 I also tried: long doublePayment = 1099; NumberFormat n = NumberFormat.getCurrencyInstance(Locale.US); String s = n.format(doublePayment); System.out.println(s); Output $1,099.00 Since this is cents, the output should be 10.99 or $10.99. Cant figure out what I am doing wrong. Thanks!!!

Member Avatar
Member Avatar
+0 forum 1

i want to design the Currency gadget .....that should work in all the operating system it should be something like installation application as shown in the above daigram so please help me out Thank you ![currency_converter](/attachments/small/3/currency_converter.png "align-right")

Member Avatar
Member Avatar
+0 forum 1

Hi Guys, I'm looking the syntax for a input mask that will allow me to input 1.23, 12.34, 123.45 into the JFormattedTextField i found something like ###.## but that doesn't work but something like ###-## wud work. just wondering if anyone knows how to do this with a mask or currency format or number format

Member Avatar
Member Avatar
+0 forum 1

Good afternoon Well my idea is simple.What i want to do is to create a currency converter.Pretty easy task, but i want the currency rate to be updated somehow by an external server, probably from an website.Although i have experience in programming i have no clue how to use an external server to update a variable. Any help is appreciated Thank you!!

Member Avatar
Member Avatar
+0 forum 4

All right. So i have child, parent, activity and register table and i want know how much money a parent will pay for his child if the child have 1 or more activities. So i came out with this code: [CODE]SELECT CONCAT_WS (' ', parent_title, parent_fname, parent_sname) AS 'Parent/Carer Name', CONCAT('£', act_price) AS Amount, COUNT(*) AS 'Nr of Act.' FROM Activity A, Parent P, Child C, Register R WHERE C.parent_id = P.parent_id AND C.child_id = R.child_id AND A.act_id = R.act_id GROUP BY P.parent_id[/CODE] and see atachment for result. the thing is in the Amount column the value are all £0.00 …

Member Avatar
Member Avatar
+0 forum 3

Hello Dani Web Forum, I'm really new to C. I have an assignment, which I think it's very hard to solve. I have to create a Currency Converter Program that reads data from txt files. The program should also be able to read arguments (argv[]). I'm really confused since it's just a plain text. How can I read it as a database in C? The data, which on the "currency.txt" saved with: [CODE] typedef struct{ char date[11]; char curr[10]; double buying; double selling; }CURRENCY; [/CODE] contains: -------------------------------------------------- DATE | currency | buying rate | selling rate *not stated in "currency.txt" …

Member Avatar
Member Avatar
+0 forum 7

I am currently able to achieve number format as 1,000,000,000 but I want to get it as 1,00,00,00,000. How can I achieve this? can some one help please. Currently I use as below. [CODE]<? echo number_format($row["SUM(Amount)"],0); ?>[/CODE]

Member Avatar
+0 forum 0

[ATTACH=RIGHT]16322[/ATTACH]This week players of Facebook games found themselves unexpectedly rewarded for their playtime. The frequent messages that Facebook has awarded the gamer with credits signals Facebook's push to implement [URL="http://www.facebook.com/help/?page=837"]Facebook Credits[/URL], a virtual currency intended to standardize payments across the multitude of Facebook applications. The push of the credits program has also signaled [URL="http://technorati.com/blogging/article/warning-facebook-free-credit-scam/"]a rise in the number of scams centered around it.[/URL] The credits can be used for virtual items, gifts, and power-ups in games such as Bejeweled Blitz, Farmville, Mafia Wars and Treasure Madness. Facebook is using a "first taste is free" approach to hook users on credits. …

Member Avatar
Member Avatar
+0 forum 1

Im trying to make a fast food program on which the user will input the amount that he has, then he will click on what he wants, by using check boxes. There are 7 different check boxes with 7 different amounts of money. I got an idea on what to do (they will check on what they want and the program will add up the total and there is only one of each item), but im confused on how to put the amount on where the check boxes (in the program area and not the text area) and add them …

Member Avatar
Member Avatar
+0 forum 5

Hi, im my c# windows application i have some reports involving currency. However the way to set the format that I've seen "C" sets the currency symbol to the dollar sign instead of the GBP sound which is the one i need. I've checked my systems regional settings and they're all correct. Is there a different format I should be using? Many thanks

Member Avatar
Member Avatar
+0 forum 1

I am new to Visual Basic I'm a student and im working on a payroll calculator program I got it to where it will display user input now i have to get it to calculate pay based on which radio button is selected im doing this one at a time the Trainee button is 10.00 for regular hours and 15.00 for overtime hours and I have to use format currency as well here is what I have code wise any points in the right direction will be greatly welcomed Thank You. [CODE]Option Strict On Public Class PayrollCalculator Dim intRegularPay As …

Member Avatar
Member Avatar
+0 forum 1

Hi All, I am trying to program a web based cash register/POS application. I would like to use a function to format the number in the "Amount Received" text box. The idea I have in mind is to always keep two decimal places at all times. For Example: if someone typed in 2000 it would automatically change that to 20.00 I would probably be triggering the function via onkeyup so it would actually change it on number at a time. 2->.02, 20->.20, 200->2.00, 2000->20.00 ect. I know I could do it in php when processing the form, but I would …

Member Avatar
Member Avatar
+0 forum 11

Hi, I am a total newbie to programming, so I do not know much about it. However I have created this very basic program which converts 2 currencies. I would appreciate it if I received some constructive criticism so I can improve my programming skills. Thanks, xka [CODE] #include <iostream> #include <cstdlib> #include <cmath> #include <windows.h> int yGB(); int gbY(); using namespace std; int main() { int opChoice; cout << "Welcome to the currency converter \n\n\n"; Sleep(1000); starto: cout << "1. British sterling to Japanese Yen. \n"; cout << "2. Japanese Yen to British sterling. \n"; cin >> opChoice; switch(opChoice) …

Member Avatar
Member Avatar
+0 forum 7

Taxes, inflation, oil prices – even the price of corn are dominating the economic headlines these days. But should they overshadow the story of the (briefly resurgent) U.S. dollar? I don't think so - and I don't think anyone in the tech sector should sell the dollar story short, either. The dollar dictates the price and value of U.S.-made technology products and services. When the dollar's down, it makes U.S.-made computers, for example, less valuable. It takes more and more dollars to buy that computer And that's been the case of late. In fact, the dollar has been in the …

Member Avatar
+0 forum 0

The End.