When I submit my form and use PHP's var_dump on $date it shows the correct variable value in my web browser but it will NOT write the value into the source code and instead shows NULL. Here's my code.
<form name="newItemForm" id="newItemForm" method="POST" action="record3.php" data-ajax="false">
<input type="hidden" name="storeID" value="<?=$storeID;?>" />
<input type="hidden" name="date" value="<?=$date;?>" />
<p><label for="itemname">Item name</label>
<input type="text" name="itemname" id="itemname" autofocus /></p>
<p><input type="submit" name="save" value="Save" /></p>
<p><a href="home.php">Cancel</a></p>
When the form submits it goes to record3.php where I have this:
if(isset($_POST['storeID'])) { $storeID = $_POST['storeID']; }
if(isset($_POST['date'])) { $date = $_POST['date']; }
?>
<h3>Transaction</h3>
<form name="transactionForm" id="transactionForm" method="POST" action="record2.php" data-ajax="false">
<input type="hidden" name="storeID" value="<?=$storeID;?>" />
<input type="hidden" name="date" value="<?=$date;?>" />
<?php
var_dump($date);
die(); ?>
When I check my source code in the web browser I see this:
<form name="transactionForm" id="transactionForm" method="POST" action="record2.php" data-ajax="false">
<input type="hidden" name="storeID" value="" />
<input type="hidden" name="date" value="" />
NULL
I can't post a picture but this is copied from what I see on the webpage itself where the NULL is showing up in the source code of that same webpage: string(8) "12222013". How could I see one thing in the webpage and another thing when I view that webpage's source code (as viewed from the web browser)?