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 '| Account name |
|---|