I managed to fix that one, but this joining thing is causing me a headache.
I have a $edit , and $view , that holds the Unit and Complex numbers.
$tenant = mysql_query("SELECT com_name, unit_number, ten_id, ten_name FROM units INNER JOIN tenants ON units.unit_number = tenants.unit_number WHERE units.unit_number = '$complex' and tenants.unit_number = '$edit'",$con);
units table:
com_id
unit_number
unit_description
unit_rooms
unit_lastsold
unit_parkingbay
unit_garage
tenants table:
com_id
unit_number
ten_id
ten_initials
ten_name
ten_surname
ten_title
ten_idnumber
ten_homenr
ten_worknr
ten_cell
ten_postal
ten_residential
ten_fromdate
ten_todate