why it doesn't grow on five to five (10, 15, 20, 25, 30)
How to do it?
<html>
<body>
<?
$numero=($herencia+$incremento);
echo "$numero";
?>
<a href="suma.php?incremento=5?herencia=<? echo "$numero"; ?>">add</a>
</body>
</html>
Moderator: General Moderators
Code: Select all
<html>
<body>
<?php
$herencia = (!empty($_GET['herencia']) && is_numeric($_GET['herencia'])) ? $_GET['herencia'] : 0;
$incremento = (!empty($_GET['incremento'])) ? $_GET['incremento'] : 5;
$numero = $herencia + $incremento;
echo $numero;
?>
<a href="suma.php?incremento=5&herencia=<?php echo $numero; ?>">add</a>
</body>
</html>