I have a form, Form_hour.php
, that is loaded into the browser, and allows a user to select an hour. The form sends the variable $hour
, via action="get"
, to the file View_A.php
which uses $hour
to query a database, and then loads View_A.php
into the browser window, showing data for the selected hour.
In View_A, there is a button allowing the user to switch to View_B. The idea is that when the user clicks on View_B, the file View_B.php
loads in the browser. View_B.php
, like View_A.php
, queries the database using that same $hour
.
So what I want is for the same user-selected variable $hour
to be available to both View_A.php
AND View_B.php
. i.e., if the user selects 6 a.m., then I want View_A and View_B to show data for 6 a.m.
I thought that having Form_hour.php
send $hour
to the file common.php
, and then include common.php
in View_A.php
and View_B.php
would work. But I keep getting the error "Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 4327 bytes)" in View_A.php
.
Does anyone have any ideas what I'm doing wrong?
Thanks in advance!