Hi I am very new to PHP
I have two text boxes A and B when I open the web page A is already populated with a number if I input a number in B I want that number to be subtracted by A (A-B) and the answer should be displayed back in A text box
Please help me and give me some sample codes

Thanks
God Bless

Eranga

hope this will do for you.

<?php

$varA = 10;
$varB = $_REQUEST['valB'];

?>
<input type="text" value="<?php echo $varA; ?>"><br />
<input type="text" id="valB" value="<?php $varB; ?>">
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.