LAMP Project- Receipts Assignment

Which receipts would you like to view?

Please choose the particular transaction from the list of transaction ID numbers:

connect_errno) { print( "Failed to connect to MySQL: (" .$db_link->connect_errno . ") ".$db_link->connect_error); } /* print("

Connection: ".$db_link->host_info . "
\n"); */ /* print( nl2br("Connected successfully\n")); */ $cID = $_GET['customerID']; $test_query = "SELECT 1 FROM customers WHERE cID = $cID"; $query = "SELECT DISTINCT tID FROM transactions WHERE customer = $cID "; $result = mysqli_query($db_link,$query); $test = mysqli_query($db_link,$test_query); $testresult = mysqli_fetch_array($test); if ($testresult[0] == 1){ print( ""); print("

How would you like to sort the items in the transaction?


" ); } else { print("


The customer number you entered was invalid. Please go back and try again.

"); } /* Free resultset */ mysqli_free_result($result); /* Closing connection */ mysqli_close($db_link); ?>