From bf0ba8cf3b172f6960a9b53131d2a4c6ee4e84f7 Mon Sep 17 00:00:00 2001 From: mauirixxx Date: Wed, 8 Aug 2018 16:31:04 -1000 Subject: [PATCH] can now add account names, still need to view current names --- addaccounts.php | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/addaccounts.php b/addaccounts.php index b4b079b..8fe1d0e 100644 --- a/addaccounts.php +++ b/addaccounts.php @@ -1,6 +1,26 @@ user page'; + +if (!empty($_POST['accemail'])) { + $addacc = $con->prepare("INSERT INTO gwaccounts (userid, accemail) VALUES (?, ?)"); + $addacc->bind_param("is", $_SESSION['userid'], $_POST['accemail']); + $addacc->execute(); + $addacc->close(); + echo 'New account added, returning to editor.'; + header ("Refresh:1; url=addaccounts.php"); + exit(); +} + +echo '
'; +echo ''; +echo ''; +echo '
Add a new Guild Wars account e-mail
'; + +echo ''; +echo ''; +// grab account name from database and loop it in here as a read only bit + +echo '
Return to your user page'; include_once ('footer.php'); ?> \ No newline at end of file
Current Guild Wars accounts
Account name