Ok wonderful issue happening. Something has to be wrong with the following code, yet I cannot seem to find a problem.
Code: Select all
$result = mysql_query("SELECT id FROM payments WHERE lastname='$lastname' AND firstname='$firstname'");
$row = mysql_fetch_row($result);
$transaction_id = $row["id"];
That is the code used to get the id.
If i were to run through MySQL in the SQL box:
Code: Select all
SELECT id FROM payments
WHERE lastname='%ANY LASTNAME existing in table%' AND firstname='%ANY FIRSTNAME matching with last name%'
I get the ID column and ID number
Thats basically what it looks like:
--
ID
1
--
This has got me quite confused. Because the lastname and firstname are set correctly and are not overridden because the echo statement follows right after the transaction_id echo statement. This would leave me to believe that the code that is being used to generate the transaction_id is incorrect or there is a very small error.