PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I am new to php and I a trying to use the "if statement" but it seems no matter what I do it does not work. What I am trying to do is, if the return on investment is a negative value make it $0 instead. It worked for the return on investment as a pecentage but can't get it to work on the dollars.
Here is some code, in the "comments testing" you can see what I am trying to do. Here is a link to the form! http://www.inflatablemarketplace.com/roi/
Earlier on in the script, you defined the variable as $projected_return_dollars but you're checking if $projected_return_dollar (note the missing s) is < 1.
Celauran wrote:Earlier on in the script, you defined the variable as $projected_return_dollars but you're checking if $projected_return_dollar (note the missing s) is < 1.
That's funny when I put the "s" at the end of dollar and then load the form , it does not do the calculations at all. It is like the calculate button does not work anymore.