fastrobby Posted September 20, 2012 Share Posted September 20, 2012 Hi, This is a shopping cart site. I have a variable $id being successfully brought to the next page from a hidden form field in my "product.php" page where I have established a variable $pid=$_POST['pid']; at the top of the page just in case ! <input type="hidden" name="pid" id="pid" value="<?php echo $id; ?>" /> On the next page "contact page" I have duplicated the hidden form field <input type="hidden" name="pid" id="pid" value="<?php echo $id; ?>" /> and again placed $pid=$_POST['pid']; at the top of the page. Once again it is passed successfully. On third page "cart.php" using the error checking code echo '<pre>'; print_r($_POST); echo '</pre>'; die; I find that pid=> is empty Code to receive the variable is if (isset($_POST['pid'])) { $pid = $_POST['pid']; $wasFound = false; $i = 0; Any clues ? It's got me stumped completely Any help would be very appreciated. I have uploaded the 3 files in question Thanks Robby 19047_.php 19048_.php 19049_.php Quote Link to comment Share on other sites More sharing options...
Jessica Posted September 20, 2012 Share Posted September 20, 2012 $pid and $id are not the same thing. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.