Jump to content

joyser

Members
  • Posts

    17
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

joyser's Achievements

Member

Member (2/5)

0

Reputation

  1. yup thats perfect thanks
  2. 1.5 -> 3/2 2.2 -> 11/5 sorry, ignore the $decimal--; at the top
  3. it will change a decimal number into a fraction, but of the simplest form, so the decimal of 1.5, would be brought down to .5 firstly, and then transformed into a fraction, 1/2. however, when I use any number below 1.5 (which is then .5) it doesn't work.
  4. I have the following: $decimal is a number above 1.0. function change_number($decimal){ $decimal--; $divider=$decimal; $q=1; while($new_decimal != $decimal) { $decimal = $divider*$q; $new_decimal = explode(".",$decimal); $new_decimal = $new_decimal[0]; $q++; } return $decimal."/".$decimal/$divider; } Anytime I have a number under 1.5 as $decimal, the while() loop does not function properly? any ideas?
  5. hmm is there not a simple function like the one used for uploading files?
  6. Hello, how do i go about saving a file which is on a different server (a .swf file) onto my server?
  7. ok, lets says i have an array that looks like this: {1,3,2,3,5,1,2,3,1,2,3,1,5} how do i find out how many different things are in that variable..in this case the anser would be "4" because there are four different things in it....
  8. is their a simplier way? this involves unix etc.
  9. using phpmyadmin.. is it possible to set a field to count down, once a day...for example you set a field to 28 and each day at midnight, it goes down one? what do i do to get this effect?
  10. thanks for replying guys my code is like this:
  11. nope, still doesn't work
  12. ok, i have two varibles.. this is my statment: $hours = 15 and $timechange = 8. However when i echo the result, i get this: why is this? is it something to do with variable type? if so, how do i fix it?
  13. thanks for helping. how do i completely whip an array in php of all its data? help appreciated
  14. ok, i am using php my admin, and this is the problem i have, when a user logs in, it does not matter what case they put there name into the input box, it accepts as being the same as to what is in the DB, however the one in the DB is different, it has a first letter caps on some of them, but not all. hence i cannot simply change the login string to caps. how do i make it so that they must be the same case aswell when they are compared? summed up: how do you make php return this as false: if("HELLO" =="hello")
  15. this command is returning this:Resource id #4 $query="SELECT `password(md5)` FROM `users` WHERE `First name`='mick' AND `Second name`='waffle'"; $result=mysql_query($query); echo $result;
×
×
  • 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.