Would really appreciate it if someone could point me in the right direction.
I am starting to learn PHP again as I have not touched it for years.
Below is a snippet of code I have wrote for a Message System.
<?php
$stmt = $user_home->runQuery("SELECT * FROM tbl_messages WHERE recipientID=:uid");
$stmt->execute(array(":uid"=>$_SESSION['userSession']));
while ($qryMessages = $stmt->fetch(PDO::FETCH_ASSOC))
{
$mID = $qryMessages['msgID'];
$mTitle = $qryMessages['msgTitle'];
echo "<td><a href='?read&mID=$mID'>" . $mTitle . "</a></td>";
}
?>
Some HTML here etc....
<?php
if(isset($_GET['read&mID=' . $mID]))
{
echo $mID
}
?>
I want to be able to show the message on the same page by using isset() but cannot seem to pass the $mID variable to it when its clicked, I keep receiving this error message:
Notice: Undefined variable: mID in D:\xampp\htdocs\development\template\home\messages.php on line 234
Any feedback would be greatly appreciated.