Page 1 of 1

little help please

Posted: Sat Nov 16, 2013 9:40 pm
by justforfun
hey guys just wondering if anyone could help me with a little issue that i am having (PHP)

basically what i am doing is having a item with a ware value in % and i cannot get it to be at a max value of 100% it always exceeds this.

is there some sort of code that i can use to max the value or something similar live a specific value in phpmyadmin

Cheers

James

Re: little help please

Posted: Sat Nov 16, 2013 9:57 pm
by Jackolantern
Can you post the code that isn't working? It shouldn't be much of an issue to put the percentage to 100, so there is likely a logical error.

Re: little help please

Posted: Sat Nov 16, 2013 10:08 pm
by justforfun

Code: Select all

if ($playerinfo3['frontww'] >= 85) {echo "<br>You Are unable to do a test session as one or more of your parts exceed 85%";echo "<center><a href='index.php'>Go Back</center></a>";exit;}
all i have been able to do is stop the user carrying out certain tasks when the item is over a certain wear value but not stop it exceeding the value all together

so if the wear was 84% they could carry out the task but potentially the wear will then exceed 100%

Re: little help please

Posted: Sat Nov 16, 2013 10:22 pm
by justforfun
suppose i could do a statement checking if the wear is greater than 100 and then just change it that way

Re: little help please

Posted: Sun Nov 17, 2013 3:09 pm
by justforfun
could someone help me with this please

Image

from the pic above i want to get the text "Testing" to move parallel with the first box

is there something i do with the code or in css

Cheers

Re: little help please

Posted: Sun Nov 17, 2013 4:50 pm
by Xaos
Make it into a div and move it using CSS

Re: little help please

Posted: Sun Nov 17, 2013 6:21 pm
by Jackolantern
Yes, put them in divs and float: left to both of them.

As for the other issue, we need to see the code that is adding to that amount, not the IF statement. We need to see why it is going over what it should be.

Re: little help please

Posted: Mon Nov 18, 2013 11:34 pm
by justforfun
thanks for that guys all sorted now