From 306aa3f19bc353998de194259fc8cbfcaf77694f Mon Sep 17 00:00:00 2001 From: mauirixxx Date: Thu, 9 Aug 2018 00:51:42 -1000 Subject: [PATCH] list current accounts tied to user --- addaccounts.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/addaccounts.php b/addaccounts.php index 8fe1d0e..e9c4875 100644 --- a/addaccounts.php +++ b/addaccounts.php @@ -15,12 +15,21 @@ if (!empty($_POST['accemail'])) { echo '
'; echo ''; echo ''; -echo '
Add a new Guild Wars account e-mail
'; +echo '

'; -echo ''; +echo '
Current Guild Wars accounts
'; echo ''; // grab account name from database and loop it in here as a read only bit +$acclist = $con->prepare("SELECT accemail FROM gwaccounts WHERE userid = ?"); +$acclist->bind_param("i", $_SESSION['userid']); +$acclist->execute(); +$result = $acclist->get_result(); +while ($row = $result->fetch_assoc()) { + echo ''; +} +$acclist->close(); +echo '
Current Guild Wars accounts
Account name
' . $row['accemail'] . '
'; echo '
Return to your user page'; include_once ('footer.php'); ?> \ No newline at end of file