Jump to content

JudgementDay

Members
  • Posts

    60
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

JudgementDay's Achievements

Member

Member (2/5)

0

Reputation

  1. I apologize for being such a douche, especially because I did it while pointing out how stupid I've been recently. My self-esteem problems have just gotten worse since I realized all the people I used to bully in high school are the ones who became actually successful in life. [He didn't actually said this, but since I banned him I figured I'd give him a more reasonable sign-off. -Dan]
  2. Stop acting like [mod edit]. Its pathetic and makes computer programmers look bad.
  3. I'm so [mod edit] mad you got no idea! I just finished something that took me 20 hours, then at the end, realized I coulda did it in [mod edit] 20 minutes! I was doing this for 100 files: <?php session_start(); if (isset($_SESSION['lay-by']['content'])) {include '../rawcode/lay-by/pendinglay-by';} else {include '../rawcode/lay-by/toindex';} ?> Creating whole new directory clones with files... just splitting it off to a toindex file which forwards to /. When, all I had to [mod edit] do was chuck this at the top of the [mod edit] page!: if (empty($_SESSION['order']['content']) {header('Location: /');} What a joke and a half. 2 days wasted on something that would of only took me 10 minutes. I'm new as but i still feel like a [mod edit] idiot. How dumb can you be, seriously.
  4. ... so do you know any ways apart from the one I suggested?
  5. What are some ways to prevent Apache from serving a folder in the root directory? I have raw data in there containing PHP with passwords for my SQL database, and I don't want it being served up. I'm thinking just .htaccess with a password. Is it possible to do within my servers configuration file? I want to hear what other people would do.
  6. Hey bro, I find temporary variables cause spaghetti and crufts up my code. Hey, I found a solution to my problem. Its beyond my capacity to understand how it works, but all I know it does. I don't have time to learn how it works. I am badly behind schedule. $formula = ((int)((1 + 2 * 1.01 + 3) * 100)) / 100; $grandtotal = sprintf("%01.2f", $formula); Anyway, gotta run. Just came back to share the solution and mark as solved.
  7. $grandtotal = ((int)((450 * 1.01) * 100)) / 100; gives me '454.5'. Is it possible to get '454.50' instead?
  8. I don't know what that means. Anyway, the problem is now solved: $grandtotal = ((int)(($_SESSION['order']['contentvalue'] + $_SESSION['order']['deliverycost'] * 1.01 + $_SESSION['order']['paymentsurcharge']) * 100)) / 100;
  9. I'm having a little trouble when using the solution with my own code. I am getting the error 'unexpected ;': $grandtotal = ((int)(($_SESSION['order']['contentvalue'] + $_SESSION['order']['deliverycost'] * 1.01 + $_SESSION['order']['paymentsurcharge'])) / 100; I can understand why ';' is unexpected?
  10. ((int)((150 + 20.95 * 1.01 + .5) * 100)) / 100; Solved.
  11. I want to compute 150 + 20.95 * 1.01 + .5 so I get '171.65'. echo (150 + 20.95 * 1.01 + .5); gives me '171.6595'. I tried echo number_format(150 + 20.95 * 1.01 + .5, 2);, but I got '171.66'. How can I go about getting '171.65'?
  12. Just came back to say thanks guys. I sorted out my math mess.
  13. Don't bother replying. Stupid own fault again. I am switching off this computer and going for a walk. I need to reboot. Big mistake jumping on the computer so early.
  14. Gezus! Now I have another problem. I swear when ever maths is involved everything goes wrong for me. PHP: 150 + 20.95 * 1.01 + .5 = 171.66 Calculator: 150 + 20.95 * 1.01 + .5 = 171.65 Whats up with that?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.