Revisiting this calculator script, now this is what i have:
[code]
<?php
$hist = $_POST[‘hist’];
$calc = $_POST[‘calc’];
eval(“$calc2 = “$calc”;”);
$hist = $hist . $calc2. ” = ” . $calc . “<br>”;
echo $hist ;
?>
<form method=”post” action=”index.html”>
<input type=”hidden” name=”hist” value=”<?php echo($hist); ?>”>
<input type=”text” name=”calc” size=”50″><br>
<input type=”submit” value=”solve”>
</form>
Almost works, except it doesn’t actually eval the problem, it just spits it back out as a string. There is something wrong in the eval parameter. This is crazy, this function is SOOOOOOOOOOO weird! I keep playing around with the syntax, but the only one that wont give me an error is this one (taken from php.net manual)
Anyhu, any help with this? I think all the rest of the script is perfect, I just need to get the parameter in that eval function notated correctly. PLEASE HELP!