Hi all,
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??:?:
Please see the below two files (working code on its own):
File 1: index.php
<?php
//*
$T1_R_ID = "#1 - Regular";
$T1_R = 25;
$T1_E_ID = "#1 - Exclusive";
$T1_E = 100;
//*
$T2_R_ID = "#2 - Regular";
$T2_R = 50;
$T2_E_ID = "#2 - Exclusive";
$T2_E = 200;
//*
$T3_R_ID = "#3 - Regular";
$T3_R = 75;
$T3_E_ID = "#3 - Exclusive";
$T3_E = 300;
//*
$T4_R_ID = "#4 - Regular";
$T4_R = 100;
$T4_E_ID = "#4 - Exclusive";
$T4_E = 400;
?>
<html>
<head>
</head>
<body>
<form action="process.php" method="post">
<label><?php echo $T1_R_ID ?></label>
<input type="hidden" name="temp_price" value="<?php echo $T1_R ?>" />
<input type="hidden" name="temp_id" value="<?php echo $T1_R_ID ?>" />
<input type="submit" name="submit" value="Buy Regular">
</form>
<form action="process.php" method="post">
<label><?php echo $T1_E_ID ?></label>
<input type="hidden" name="temp_price" value="<?php echo $T1_E ?>" />
<input type="hidden" name="temp_id" value="<?php echo $T1_E_ID ?>" />
<input type="submit"name="submit" value="Buy Exclusive">
</form>
<form action="process.php" method="post">
<label><?php echo $T2_R_ID ?></label>
<input type="hidden" name="temp_price" value="<?php echo $T2_R ?>">
<input type="hidden" name="temp_id" value="<?php echo $T2_R_ID ?>" />
<input type="submit" name="submit" value="Buy Regular">
</form>
<form action="process.php" method="post">
<label><?php echo $T2_E_ID ?></label>
<input type="hidden" name="temp_price" value="<?php echo $T2_E ?>">
<input type="hidden" name="temp_id" value="<?php echo $T2_E_ID ?>" />
<input type="submit"name="submit" value="Buy Exclusive">
</form>
<form action="process.php" method="post">
<label><?php echo $T3_R_ID ?></label>
<input type="hidden" name="temp_price" value="<?php echo $T3_R ?>" />
<input type="hidden" name="temp_id" value="<?php echo $T3_R_ID ?>" />
<input type="submit" name="submit" value="Buy Regular">
</form>
<form action="process.php" method="post">
<label><?php echo $T3_E_ID ?></label>
<input type="hidden" name="temp_price" value="<?php echo $T3_E ?>" />
<input type="hidden" name="temp_id" value="<?php echo $T3_E_ID ?>" />
<input type="submit"name="submit" value="Buy Exclusive">
</form>
<form action="process.php" method="post">
<label><?php echo $T4_R_ID ?></label>
<input type="hidden" name="temp_price" value="<?php echo $T4_R ?>">
<input type="hidden" name="temp_id" value="<?php echo $T4_R_ID ?>" />
<input type="submit" name="submit" value="Buy Regular">
</form>
<form action="process.php" method="post">
<label><?php echo $T4_E_ID ?></label>
<input type="hidden" name="temp_price" value="<?php echo $T4_E ?>">
<input type="hidden" name="temp_id" value="<?php echo $T4_E_ID ?>" />
<input type="submit"name="submit" value="Buy Exclusive">
</form>
</body>
</html>
File 2: process.php
<?php
$temp_id = $_POST["temp_id"];
$temp_price = $_POST["temp_price"];
?>
<input type="text" readonly id="chosen" name="chosen" value="<?php echo $temp_id ?>" alt="<?php echo $temp_price ?>" />
Any help or advice whatsoever would be greatly appreciated.
L.