Help with form POST var values to new page

I've written some code which seems to be working when isolated on testing pages, however, as soon as I integrate the codes within my site files, the code no longer works.

What the code does: currently, when the first page loads, you have an option of which template you would like to purchase. Once you press the submit button, a new page loads and inserts the "hidden" values of the chosen template into a new text input.

Like I said, the code works on its own, but as soon as I implement it within the rest of my site files, the values will no longer show on the second page.

Obviously something within my site files is interfering with this code, right? I've tried deleting each javascript or php code alone and test it out one at a time to see what's breaking it, but no luck (P.S. I've even tried this 3 times, thinking I may have forgotten to delete one at some point)! Now there's way too much PHP code required to load each page, so I wouldn't be able to copy/paste or upload the files here.

The question: How would I go about finding the code that seems to obviously be interfering with the new working code? Is there something like Firebug that exists for PHP code??:?:

I've written some code which seems to be working when isolated on testing pages, however, as soon as I integrate the codes within my site files, the code no longer works.

What the code does: currently, when the first page loads, you have an option of which template you would like to purchase. Once you press the submit button, a new page loads and inserts the "hidden" values of the chosen template into a new text input.

Like I said, the code works on its own, but as soon as I implement it within the rest of my site files, the values will no longer show on the second page.

Obviously something within my site files is interfering with this code, right? I've tried deleting each javascript or php code alone and test it out one at a time to see what's breaking it, but no luck (P.S. I've even tried this 3 times, thinking I may have forgotten to delete one at some point)! Now there's way too much PHP code required to load each page, so I wouldn't be able to copy/paste or upload the files here.

The question: How would I go about finding the code that seems to obviously be interfering with the new working code? Is there something like Firebug that exists for PHP code??:?:

The first file is the index.php file which lets the customer choose their template.

The second file will be the order confirmation file, which should show the chosen template info and have other additional options below.

This second file, submits new information when the customer hits the submit button from the second file (order confirmation file).

This is the code for the submit button on the second file: <input id="submit" type="submit" class="button small float-right" name="Submit" value="Checkout Now"> All the submit buttons on the first file are showing as name="submit" and the second file, the submit is name="Submit".

There can only be one file posting information at a time. You may have one 'form processor page' that will take info from either post, but why?...
where is your second file code?
index.php should post to x.php, process index info.
off that info, x.php should populate from data and submit to y.php.
y.php processes x.php info, all submitted and processed from index.php.
this is my understanding of what you are trying to do...
you responded but i have no idea what you are asking for at this point please clarify. what is your error?