JAVASCRIPT VERSION
mytitle
function multiply(x){
var myresult = 2 * x;
document.write(myresult);
}
PHP VERSION
mytitle
if($mybutton){
$myresult = 2 * $mybutton;
pr
PHP is entirely server-based. So when you load this page into your
browser, all of the PHP is being parsed BEFORE it ever loads into the
browser. So the function will be executed even before the page loads.
Do it in JavaScript if you want it to be done in the browser. What you
have written
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
* On 11-01-02 at 22:48
* Morten Nielsen said
> Hi,
>
> I am rather new to PHP so I hope somebody can help me.
>
> I have a normal button (HTML code). Then I have made a function
>
> function multiply($X)
> {
> return 2*$X;
> }
>
> The b
3 matches
Mail list logo