![]() Xboxic News - Xboxic Wiki |
|
|||||||
| Xbox Live Service The place to be for any questions about the service, your subscription or the Marketplace. |
![]() |
|
|
Thread Tools |
|
|
#1 | |||||||||||
|
Apprentice Member
|
Hi guys,
I have been playing with learning PHP and thought i would make a little converter that changes MSP (Microsoft Points) into these currencies. USD, EURO, GBP, CAD, AUD, JPY, NOK & CHF Check it out: http://www.mspconverter.com/ Thanks bigsteveouk EDIT: Added JPY, NOK & CHF EDIT2: Changed to new URL Last edited by bigsteveouk; September 1st, 2006 at 17:08. |
|||||||||||
|
|
|
|
|
#2 | |||||||||||
|
Hardcore Member
|
Well I'm a web developer and a tester for a living so I can give you a few little tips :thup: Nothing important, it certainly works.
#1: It's not displaying the correct number of decimal places for currencies; i.e. if the price is £12.40 then it displays £12.4. There are two ways you can deal with this; either convert the original number to two decimal places before displaying it, or do a check to see if it's only got one character after the "." symbol, and if so then pad a 0 on the end. As you're still learning PHP, I'll do the "cruel to be kind" thing and leave you to find out how to do it yourself - you'll learn more by trial and error First way is definitely easiest.#2: Yeah, I got sneaky and looked in your code. Can't you get Yen to work? Why did you comment it out? If you don't want it to even appear in your code, use PHP comment tags rather than HTML comment tags, and it won't even be outputted to the code. PHP comment tags are definitely safer because then sneaky people like me can't see stuff that they shouldn't! #3: You've got just the one form input field (MSP) but you're not validating it; you should really make it so that it only accepts numbers, and if you put anything else in then it displays a popup error message "Please enter a numeric value for MSP" or something. On the plus side it doesn't crash if you put a non-numeric value in... was that just luck? Sorry for being VERY picky, it's my job! But as first PHP projects go, it's a great start. Heck it works, I couldn't break it as such, which is better than most of the projects that I put together myself... Good luck in your future work ![]() |
|||||||||||
|
|
|
|
|
#3 | |||||||||||
|
Newsposter
|
Only one comment. Why isn't xboxic.com on the "Links to cool websites" page?
Other then that (and the decimal and jpy problem), great work for a first project ![]()
__________________
Disclaimer: This is mho so don't be offended. It's nothing personal. |
|||||||||||
|
|
|
|
|
#4 | |||||||||||
|
Apprentice Member
|
Cheers for the advice guys. Im working on the Yen as we speak!
![]() I will have a look at adding the extra 0 to the end when needed. Also, I have added xboxic to the links page ![]() |
|||||||||||
|
|
|
|
|
#6 | |||||||||||
|
Apprentice Member
|
Quote:
It's more to learn this damn php ![]() |
|||||||||||
|
|
|
|
|
#7 | |||||||||||
|
Apprentice Member
|
fixed the lack of the extra zero with the money_format converter
|
|||||||||||
|
|
|
|
|
#8 | ||
|
Elite Member
Join Date: Mar 2006
Posts: 2,017
|
Ok, I'm not a maths-magician, but if I type 1 MS point, it says that = 1 pence, I type 34 in and it converts to 28 pence, can you explain that? Shouldn't it be 34 pence?
Other than that, that site is actually really neat, and I've learned from it immediatly. |
||
|
|
|
|
|
#9 | |||||||||||
|
Editor Playstation
Xbox Live: Rivalz0r
PSN ID: Rivalz0r
Wii: 1605-9218-7353-0870
Join Date: Feb 2006
Location: Netherlands
Posts: 4,910
|
Quote:
|
|||||||||||
|
|
|
|
|
#10 | ||
|
Elite Member
Join Date: Mar 2006
Posts: 2,017
|
Yeah, I can be a bit weird like this, but he asked for feedback, and that's the only flaw I could find.
|
||
|
|
|
|
|
#11 | |||
|
Junior Member
|
honestly, i think u did a good job. but on the canadian funds, u are about 60 cents off. its actually 19.99 for a card that gives u 1250 points. i know its nitpicking, but i just thought id be honest. but good job with that. i could never do it lol.
__________________
Currently playing BFME2, halo 2, cod2, kingdom hearts 2, graw, mgs 3, and shadow of collosus. member sony's GAP 6/20/06 |
|||
|
|
|
|
|
#12 | |||||||||||
|
Apprentice Member
|
Quote:
|
|||||||||||
|
|
|
|
|
#13 | |||||||||||
|
Apprentice Member
|
Quote:
|
|||||||||||
|
|
|
|
|
#14 | |||||||||||
|
Root
Xbox Live: curry684
Wii: 2894-5505-7501-3553
Join Date: Feb 2006
Location: The Netherlands
Posts: 5,601
|
Quote:
As Rival24 predicted, I will be bitching about validation (had that link on my clipboard before I read his post ) "I'm just learning this stuff" isn't an excuse, writing valid HTML is a prerequisite for learning PHP. After all, all PHP does it outputting HTML, so you'd better get the HTML completely covered before you start doing something that generates HTML. Sounds harshes than I mean it Validation errors are no worldshocking disaster, but you should always try to run the validator regularly during development. And about "I'm just learning": are you allowed to drive off the roadway during driving lessons because you are just learning? No, you're bound to basic traffic rules. Similarly, web development is bound by basic traffic rules, in this case those laid out by the World Wide Web Consortium or W3C. Follow their rules, you'll learn to appreciate it ![]() And please ask anything you want to know, I know a lot of PHP and HTML and I'm more than willing to help with whatever you want to know. Especially now you've added that link ![]() |
|||||||||||
|
|
|
|
|
#15 | |||||||||||
|
Apprentice Member
|
Cheers Curry, I will add a load of CSS and clean it up tonight. It's not looking the same in IE as it does in FF so need to work on that.
EDIT: All HTML Valid now ![]() Last edited by bigsteveouk; June 29th, 2006 at 12:12. |
|||||||||||
|
|
|
|
|
#16 | |||||||||||
|
Hardcore Member
|
Quote:
![]() Seems that speech marks and apostrophes cause some major confusion... |
|||||||||||
|
|
|
|
|
#17 | |||||||||||
|
Root
Xbox Live: curry684
Wii: 2894-5505-7501-3553
Join Date: Feb 2006
Location: The Netherlands
Posts: 5,601
|
Quote:
Will fix tonight if I find time ![]() |
|||||||||||
|
|
|
|
|
#19 | |||||||||||
|
Newbie Member
|
I found that if you put more than 316 9's in it, its calculations become really messed up
. Other than that it's a really cool tool.Last edited by swoosh bnd; June 29th, 2006 at 21:51. |
|||||||||||
|
|
|
|
|
#20 | |||||||||||
|
Root
Xbox Live: curry684
Wii: 2894-5505-7501-3553
Join Date: Feb 2006
Location: The Netherlands
Posts: 5,601
|
Quote:
![]() |
|||||||||||
|
|
|
|
|
#21 | |||||||||||
|
Newbie Member
|
Quote:
![]() |
|||||||||||
|
|
|
|
|
#22 | |||||||||||
|
Root
Xbox Live: curry684
Wii: 2894-5505-7501-3553
Join Date: Feb 2006
Location: The Netherlands
Posts: 5,601
|
Quote:
Hint for bigsteve: always validate your inputs, never expect the user to follow your intended logic. Just fail for numbers of more than 10 digits or something That way you can also avoid situations like this:Quote:
![]() |
|||||||||||
|
|
|
|
|
#23 | |||||||||||
|
Apprentice Member
|
Just wanted to say thanks to everyone for the tips etc. I will continue to develop the points converter. Hello to the people who send messages to my xbox too.
__________________
Check it out one time! Xboxscoop.com |
|||||||||||
|
|
|
|
|
#25 | |||||||||||
|
Apprentice Member
|
Quote:
__________________
Check it out one time! Xboxscoop.com |
|||||||||||
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
|
|