Re: HELP!!! PHP MATHEMATICAL PROBLEM !!!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is not php. 

Sounds like you are attempting to accept two variables and then perform various function. 

add ( value1, value2)
subtract( value1, value2) 
..... 

with links highlighting each function. 

Unless the website supports dynamic variables, you have to reload the page each time. which means the values have to be reentered each time. 

Marc A. Hill  Software Engineer Medisynergi http://medisynergi.proboards92.com/index.cgihttp://www.theacademi.org

--- On Wed, 7/22/09, Ella Mae Luyun <ellamae.luyun@xxxxxxxxx> wrote:

From: Ella Mae Luyun <ellamae.luyun@xxxxxxxxx>
Subject:  HELP!!! PHP MATHEMATICAL PROBLEM !!!
To: php-objects@xxxxxxxxxxxxxxx
Date: Wednesday, July 22, 2009, 11:57 PM






 




    
                  



<HTML>

<Head> <CENTER>MATHEMATICA L OPERATION </HEAD>

<CENTER>



<FORM NAME="number" >

Number 1<INPUT TYPE="text" Value="" NAME="num1">

<BR>

Number 2<INPUT TYPE="text" Value="" NAME="num2">



</FORM>

//THIS IS THE ERROR!! 

//THE RESULT SHUD NOT HAVE A TEXTBOX..

// THE NUMBER 1 AND NUMBER TWO VALUE SHUD NOT BE ERASED WHEN IT WILL BE ADD/ SUBTRATCT OR MULTIPLY..



<FORM NAME="number2" >

RESULT <INPUT TYPE="text" Value="0" NAME="numb4" >

</FORM>

</HEAD>

<body>

<SCRIPT><!--

function go(){

document.number. num1.value = ("0");

document.number2. numb4.value = ("");

}



var numb1 = document.number. num1.value

var numb2 = document.number. num2.value



function add(){

document.number2. numb4.value = parseInt(document. number.num1. . value) + parseInt(document. number.num2. value);

document.number. num1.value = ("");

document.number. num2.value = ("");

}



function mult(){

document.number2. numb4.value = (document.number. num1.value * document.number. num2.value) ;

document.number. num1.value = ("");

document.number. num2.value = ("");

}



function sub(){

document.number2. numb4.value = (document.number. num1.value - document.number. num2.value) ;

document.number. num1.value = ("");

document.number. num2.value = ("");

}



</SCRIPT>



<FORM NAME="MyForm" >

<INPUT TYPE="button" NAME="none" Value=" ADD " OnClick="add( )">

<INPUT TYPE="button" NAME="none5" Value=" SUBTRACT " OnClick="sub( )">

<INPUT TYPE="button" NAME="none3" Value=" MULTIPLY " OnClick="mult( )">



</FORM>

</CENTER>

</body> 



[Non-text portions of this message have been removed]




 

      

    
    
	
	 
	
	








	


	
	


      

[Non-text portions of this message have been removed]


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux