Jump to content

EchoFool

Members
  • Posts

    1,074
  • Joined

  • Last visited

Everything posted by EchoFool

  1. If(isset($_GET)){ Echo 1; } I tried that but it echo's 1 even if there is not GET. mgallforever - shall give it a go
  2. Is it possible to get check $_GET is set regardless of what type of $_GET is set? So say theres like 10 $_GET urls on one page. Rather than checking one at a time like this:@ if (isset($_GET['test']) OR isset($_GET['test'])) Is there a way to just do if(isset($_GET['wildcard'])) So the wild is to check for anything? =/ Would help shorten my script quite a lot lol
  3. I have this: $Gain = number_format($Gain,0); To remove the decimal places.. but it adds the "," symbol so: 1000 becomes 1,000. Which then causes my UPDATE query to crash because of the symbol. Is there a way to remove the comma but still removing the decimal places at the same time?
  4. Ok is there a way to force : 1.34078079299E+154 to come out as a normal huge number ? Like using number_format($power) ?
  5. I am suppose to multiply the result by itself ...not the step of the level... Example: If i multiply the step of the level by the result the numbers are too low... If result is 12044 then it needs to be 12044 X 12044 not: 12044 x 8 (as as example of the step of the level). My maths is poor i been mainly thinking in letters whilst making my scripts as formula's represent any numbers. Daniel - Is that still usable as integer in maths etc or will it crash out due to letters and decimal point ?
  6. 1 + 1 = 2 2x2 = 4 4x4 = 8 8x8 = 16 Thats what im aiming to get. Not what revraz showed me. How would i get it to give me a number result not : 1.34078079299E+154 Cos i cannot work with 1.34078079299E+154 from that point on, its unusable.
  7. That won't work cos 1x1 = 1 so if that was the result, then the result in a loop will always end up as 1.
  8. So $power = pow(2, $level); would also work? I tried your for loop and got: 1.34078079299E+154 Which is what i got with my while loop.. what is going wrong ?
  9. I've never heard of pow() ? What is the $i coming from ? Also what is "$i++" ? Is that just to add 1 to its self?
  10. I have a while loop which is meant to multiply a number by itself only it gave me a strange ending result... This is what i got: $Level = 10; $Check = 0; $Power = 1; While($Check < $Level){ $Check = $Check + 1; If($Power == 1){ $Power = $Power + 1; }Else{ $Power = $Power * $Power; } } Echo $Power; And the response is: Why is that? What did i do wrong.... its meant to loop 10 times. So the $Power should be 1028.. if my maths is correct. Hope you can help.
  11. LOL man thats got to be a sign that i need a break! Good spot. Can't believe i didn't see that. Thankyou!
  12. Is there a way to check that my query has actually deleted a row. I cannot tell for sure if its being deleted and then re-created. Is there like a check for affected rows or something? I have this: $GetFight = ("DELETE FROM attack WHERE Attacker='{$_SESSION['Current_User']}'") Or die(mysql_error()); And it doesn't delete my row. It's quite irritating as i do not know why. Hope you can help.
  13. RecordID is the ID of the forum thread. The list above would represent the posts in the thread so : So its not uncommon that there will be two of the RecordID but the query is needing to find the "youngest" by finding the youngest "posted on" time stamp.. the above is just an example of my idea.
  14. Hey, quick question.. Said i have rows with time stamps... now rows can have an ID but many can have the same if they are related to the same thing. So what i want to do is get one of each record ID which is the youngest. How would i go about doing something like that? Example: 1)Record 3 - 12/04/04 2)Record 3 - 12/04/05 3)Record 4 - 12/04/05 So the two that it will return is : Record 3 (The second one in the list) Record 4 as this is different entirely to the record 3's.
  15. vista is horrid for permissions i wish there was a way to turn it off completely.
  16. I have done it ... but you have to do : {$_POST['username']} thats what i did and it worked.
  17. Switch them around. Argh thank you solved the syntax. My Query turns out to be wrong again lol. Hmm might have to freelance this one. Thanks for the help.
  18. Make sure its set to true in your wordwrap encause of looooooooooooooong words.. otherwise it will push your page out of shape. If you set your wordwrap to true it will go: Just so you know ...
  19. I keep getting this error: Not sure what is so wrong about it .... i did an ORDER BY then GROUP BY but it's not happy with it... this is what i got: $GetAppeals2 = mysql_query("SELECT * FROM reportedusers LEFT JOIN (reportsituation, staff) ON reportsituation.RecordID = reportedusers.RecordID AND reportsituation.SaidBy <> staff.UserID ORDER BY reportsituation.SaidTime GROUP BY reportedusers.RecordID") Or die(mysql_error()); Not even sure if the query will work but can't tell till i get the syntax correct Hope you can help.
  20. I have a purchase system where by the user selects options over a space of 3 pages.....using forms.. each choice is carried through right to the process page which is the 4th page, but im trying to find a way so that the user's selections become null if they go to a completely different page or they skip a page... or if they go back to the first page or press the back button... this would help to avoid a double entry of some of the same items... how can this be done? I don't use sessions so i cannot kill a session as a session is not needed because its using forms throughout the entire thing.. what would you guys suggest ?
  21. So if i wanted to change option value to ID of row i would do.. But put some form a while loop to do a fetch assoc?
  22. It is a drop down box Jesi... but i'm unfamiliar with what your saying.. could you give me an example and then i can apply it in my own.. ? pocobueno1388 - will try that also... thankyou.
  23. Hello, new here! I have a question on a script im about to create... I'm wondering weather some thing like this could be done... I am creating a form and it is going to show all the rows but only some of the fields relating to each row. Now say it showed like 3 rows.... and 2 of them are identical... though the user can only pick one... how can I get that row that the user picked to find the rowID? I can't use WHERE against the 2 variables that the user has picked, because it'll find more than one row... So i need a clever way for each row being displayed though not showing the ID to the user, yet the ID needs to be along side it so that the process knows which row to deal with when the user has chosen it... Sorry if that sounds a bit confusing... I have not coded it yet by the way. I wanted to see if any knows a way to do this.. possibly like hiding the value of ID but still being loaded in the form :/ ? Let me know any way.
×
×
  • 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.