<?php
$a="";
$b="";
$c="";
if(isset($_GET["plus"]))
{
$a=$_GET['eknum'];
$b=$_GET['donum'];
$c=$a+$b;
}
?>
<form action="index.php" method="GET">
<input type="text" name="eknum" value="
<?php
echo "$a"; ?> " />
<br>
<input type="text" name="donum" value="
<?php echo $b; ?>
" />
<br>
<input type="text" name="execute"
value="
<?php echo $c; ?>
" />
<input type="submit" value="sum" name="plus">
</form>
kuldeepsheoran
0
Newbie Poster
Recommended Answers
Jump to Post<input type="text" name="donum" value=" <?php echo $b; ?> " />
The above adds unnecessary spaces to your input. Try:
<input type="text" name="donum" value="<?php echo $b; ?>" />
All 2 Replies
JorgeM
958
Problem Solver
Team Colleague
Featured Poster
pritaeas
2,194
¯\_(ツ)_/¯
Moderator
Featured Poster
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.