I'm trying to pass on some hidden fields in a form from one page to another:
<form action=\"secondPage.php\" method=\"post\">
<input name=\"from\" type=\"hidden\" value=\"$fday/$fmonth/$fyear\">
<input name=\"to\" type=\"hidden\" value=\"$tday/$tmonth/$tyear\">
<input type=\"submit\">
</form>
secondPage.php contains:
<?php
$fdate = $_POST("from");
$tdate = $_POST("to");
echo "$fdate --- $tdate";
?>
I get this error on when I click submit and am redirected to secondPage.php:
Fatal error: Array callback has to contain indices 0 and 1 in C:\xampp\htdocs\blah\secondPage.php on line 2
$_POST("to");should be$_POST["to"];