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!
the user must input a number, when it is even the number you input must be divide into half when it is odd number then the input number must be multiply into 3 then add 1. the process will stop when the answer is 1.
<html>
<body>
<form method = "POST" action = "compute.php">
Initial Value is
<input type = "text" name = "x"> <BR>
Next Value is<br>
<input type = "submit" value = "compute" name = "action">
</body>
</html>
Last edited by Benjamin on Thu Jul 16, 2009 7:33 pm, edited 1 time in total.
Reason:Added [code=php] tags.
bluekhille wrote:i've change it but the problem now is that it only displays '1' as an answer.
You need to read and understand the code before you can use it. You shouldn't just take something someone gives you, drop it into your code and run it. What if I'd posted something that wipes your server?
bluekhille wrote:i've change it but the problem now is that it only displays '1' as an answer.
You need to read and understand the code before you can use it. You shouldn't just take something someone gives you, drop it into your code and run it. What if I'd posted something that wipes your server?
that's why im asking for help because im not that good in php im only a beginner.. and my knowledge in php is not as good as yours. well tnx anyway.
And no problem. But you really should read stuff and understand it before you use it.
such a genius huh..
step by step sir i will fully understand this language. im just confused with the functions that i should use this language is very very new to me that's why as of now im just relying with others help.