Hi
When logged in as a user can you also view invoices & payments associated to that particular user?
- invoices.php
- payments.php
Within my database I have two tables 1) invoices 2) payments both containing the field "username" to filter on.
I thought it was just simply running sql queries:-
- $sql = "select * from invoices where username = '" . $username . "'";
- $sql = "select * from payments where username = '" . $username . "'";
but this just shows headings and no content?
I can do - $sql = "select from invoices"; & $sql = "select from payments"; but as you know this picks up the entire contents of both tables.
I have included the "Session start" at the top of both pages
<?php
session_start();
?>
which should carry the username through?