little help please

Place for questions and answers for all newcomers and new coders. This is a free for all forum, no question is too stupid and to noob.
Post Reply
justforfun
Posts: 22
Joined: Thu Nov 07, 2013 9:35 pm

little help please

Post 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
User avatar
Jackolantern
Posts: 10891
Joined: Wed Jul 01, 2009 11:00 pm

Re: little help please

Post 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.
The indelible lord of tl;dr
justforfun
Posts: 22
Joined: Thu Nov 07, 2013 9:35 pm

Re: little help please

Post 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%
justforfun
Posts: 22
Joined: Thu Nov 07, 2013 9:35 pm

Re: little help please

Post by justforfun »

suppose i could do a statement checking if the wear is greater than 100 and then just change it that way
justforfun
Posts: 22
Joined: Thu Nov 07, 2013 9:35 pm

Re: little help please

Post 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
User avatar
Xaos
Posts: 940
Joined: Wed Jan 11, 2012 4:01 am

Re: little help please

Post by Xaos »

Make it into a div and move it using CSS
User avatar
Jackolantern
Posts: 10891
Joined: Wed Jul 01, 2009 11:00 pm

Re: little help please

Post 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.
The indelible lord of tl;dr
justforfun
Posts: 22
Joined: Thu Nov 07, 2013 9:35 pm

Re: little help please

Post by justforfun »

thanks for that guys all sorted now
Post Reply

Return to “Beginner Help and Support”