|
|
|
@@ -12,10 +12,25 @@ if (!empty($_POST['oldpass'])) { |
|
|
|
include_once ('includes/update-password.php'); |
|
|
|
} |
|
|
|
|
|
|
|
if (!empty($_POST['prefacc'])) { |
|
|
|
//this section contains code to set the users preferred game account |
|
|
|
#include_once ('includes/set-prefacc.php'); |
|
|
|
echo 'this line will go away once the include file is completed!<br />'; |
|
|
|
} |
|
|
|
echo '<h3>Change e-mail or password</h3>'; |
|
|
|
|
|
|
|
// select which GW account you want to default to |
|
|
|
# needed code: select accid from table gwaccounts, store it in prefacc in table userinfo |
|
|
|
echo '<form action="preferences.php" method="post"><table><caption>Preferred GW account</caption>'; |
|
|
|
echo '<tr><td><select name="prefacc">'; |
|
|
|
$prefacc = $con->prepare("SELECT accid, accemail FROM gwaccounts WHERE userid = ?"); |
|
|
|
$prefacc->bind_param("i", $_SESSION['userid']); |
|
|
|
$prefacc->execute(); |
|
|
|
$resacc = $prefacc->get_result(); |
|
|
|
while ($row = $resacc->fetch_assoc()) { |
|
|
|
echo '<option value=' . $row['accid'] . '">' . $row['accemail'] . '</option>'; |
|
|
|
} |
|
|
|
echo '</td><td><input type="submit" value="Set account"></td></tr></select></table></form>'; |
|
|
|
|
|
|
|
// select which character from your GW account you want to default to |
|
|
|
# needed code: select charrid from table gwchars selected by accid |
|
|
|
|