Jump to content

nexus-cy

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

About nexus-cy

  • Birthday 08/05/1977

Profile Information

  • Gender
    Male
  • Location
    Limassol - Cyprus

nexus-cy's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. [quote author=sasa link=topic=120676.msg495241#msg495241 date=1167746637] try[code]echo number_format($total,2);[/code] [/quote] Thank you very much! your example worked just fine, much appreciated. Problem solved! Greetings, Mike.
  2. [quote author=kenrbnsn link=topic=120676.msg495233#msg495233 date=1167745993] You should be using the [url=http://www.php.net/number_format]number_format()[/url] function. Ken [/quote] Thank you for your reply, please be kind enough to explain respectively give an example of how to use this function.
  3. Hello Everyone! First off I would like to wish you all a HAPPY NEW YEAR!!! I have the following problem: I am using the sum() and calculation functions to add respectively subtract several values from a mysql database. My script is working fine up-to the point when the calculated result doesn't contain a decimal number. For example if the result is 100.15 it is displaid correctly including decimal numbers and all. When the result is 100.00 it doesn't display the .00, now my question is: is it possible to display the .00 anyway and if so how can it be done? on my result page I would like to see the decimal numbers even if they are empty because it looks better (in my opinion anyway). at the moment i am using a script like follows to calculate my result: 1st: I query my database and retrieve the values using the "SELECT sum(credits) AS credits FROM..." & "SELECT sum(debits) AS debits FROM..." 2nd: I group my values as $sum1 & $sum2 using $sum1 = $result[credits]; & $sum2 = $result[debits]; 3rd: I substract $sum2 from $sum1 using $total = ("$sum1" - "$sum2"); 4th: I display the result using echo "$total"; what i am generally looking for is an if statement that would display the .00 decimals when the result is eg.: 100.00 and display normally if the result is eg.: 100.15 Suggestions on how to accomplish this would be very much appreciated! Mike.
  4. First of all I would like to greet everyone in the phpfreaks forum, this is my first post and i hope I am in the right place, if that should not be the case I do appologize. Now down to my problem, I have created a 3 step script which in... step1 displays a html form for entering various data. step2 enters this data into a mysql database, extracts the automatically assigned unique-id of the newly entered data from the database and creates a folder with the name of the extracted id, in which I want to upload images later (created folder has mode: 0777 set). step3 displays a form with 6 file-upload fields that should send the selected image-files to a seperate script page in order to upload the selected image-files into the previously created folder. steps 1 & 2 are working great, upto the point of uploading the image-files. I don't seem to get this part of my script to work (in fact i have no idea of how to write a script that can handle multiple uploads at the same time, rather than one by one) and need some help in finding a solution. The image folder is located two level above the folder where the script should run. I hope someone can point me in the right direction to fixing my problem. If you should need more info please don't hesitate to let me know... Thank you in advance for all the tips and help. nexus-cy
×
×
  • 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.