More info always helps. So, this new info tells me you want normal tables.
In the “an_panel”, you need to attach the announcement to the user. Usually, you would have a filed in
the second table, like “poster_id” or “user_id” or something that makes sense to you. Then, the code
would process this way…
$query = “SELECT * FROM support_panel WHERE id = '”.$_SESSION[‘userid’]."’";
$result = $con->query($query);
$userData = $result->fetch_assoc();
Which would give you the data from the user’s table. Then, in the “an_panel” table, use a field “userid” or
whatever works for you. When an announcement is posted, assign the support_panel’s userid to it.
Then, you can just run another query like:
$query = “SELECT * FROM an_panel WHERE userid = '”.$userData[‘userid’]."’";
$result = $con->query($query);
$anData = $result->fetch_assoc();
Then, you have the data from the an_panel table loaded into the $anData variable that pertains only to
the userid for the current user. No JOIN is need for this. Also, note that you would allow more than one
announcement for one user, therefore to display them, you need to loop thru $anData results and make
sure you display all of them.
The examples are not tested just off the top of my head. But, Hope all that helps. Good luck.