Passing Values With Forms
Posted: Mon Feb 08, 2010 8:37 pm
Is there a way to pass the value of a variable in $_POST? I have tried the following code:
$Pickup=4;
...
<form>
....
<input type=hidden name="OT" value=intval($Pickup)>
</form>
However, $_POST['OT'] is passed as "intval(\$Pickup". If I change the line to be:
<input type=hidden name="OT" value="$Pickup">
it passes "\$Pickup". If I leave off the double quotes, it passes the same value. Is there a way so it will pass the value 4?
$Pickup=4;
...
<form>
....
<input type=hidden name="OT" value=intval($Pickup)>
</form>
However, $_POST['OT'] is passed as "intval(\$Pickup". If I change the line to be:
<input type=hidden name="OT" value="$Pickup">
it passes "\$Pickup". If I leave off the double quotes, it passes the same value. Is there a way so it will pass the value 4?