page1.php
Code: Select all
<input type="text" name="msg">
<input type="text" name="value2">
//plus all the submit junkCode: Select all
<?PHP
$msg = str_replace("1", "1+$in", $msg);
$msg = str_replace("2", "2+$in", $msg);
$msg = str_replace("3", "3+$in", $msg);
$msg = str_replace("4", "4+$in", $msg);
$msg = str_replace("5", "5+$in", $msg);
$msg = str_replace("6", "6+$in", $msg);
$msg = str_replace("7", "7+$in", $msg);
$msg = str_replace("8", "8+$in", $msg);
$msg = str_replace("9", "9+$in", $msg);
$msg = str_replace("0", "0+$in", $msg);
echo $msg;
?>like if msg=123 it would output 1+2+22+23+2
edit: btw if you didnt get this $in = 2