basic-php-16-useraccount.php / php
<?php require_once 'header.php'; username = password = mode = "Create"; if (isset(userid = mode = "Edit"; if (isset(_SESSION['user_id'] == _SESSION['access_lvl'] > 2)) { _GET['user']; sql = "SELECT * FROM forum_users WHERE id=result = mysql_query(row = mysql_fetch_array(username = useremail = accesslvl = signature = <h3>mode Account</h3>\n"; echo "<form method=\"post\" action=\"transact-user.php\">\n"; ?> <p> Full name:<br> <input type="text" class="txtinput" name="name" maxlength="100" value="<?php echo htmlspecialchars(</p> <p> Email Address:<br> <input type="text" class="txtinput" name="email" maxlength="255" value="<?php echo htmlspecialchars(useremail); ?>"> </p> <?php if (<div><fieldset>\n"; echo " <legend>Access Level</legend>\n"; sql = "SELECT * FROM forum_access_levels ORDER BY access_lvl DESC"; sql,row = mysql_fetch_array(<input type="radio" class="radio" id="acl_' . row['access_lvl'] . '" name="accesslvl" value="' . row['access_lvl'] == row['access_name'] . "<br>\n"; } echo "</fieldset></div>"; } if (<div id=\"passwords\">"; if (mode == "Edit") { if (isset(_GET['error'] == "nopassedit") { echo "<span class=\"error\">Could not modify passwords."; echo " Please try again.</span><br>"; } ?> <p> Old Password:<br> <input type="password" id="oldpasswd" name="oldpasswd" maxlength="50"> </p> <?php } if (<p> New Password:<br> <input type="password" id="passwd" name="passwd" maxlength="50"> </p> <p> Password Verification:<br> <input type="password" id="passwd2" name="passwd2" maxlength="50"> </p> <?php } if (mode != "Modify") echo "</div>"; if (<p> Signature:<br> <textarea name="signature" id="signature" cols="60" rows="5"><?php echo signature; ?></textarea> </p> <?php } ?> <p> <input type="submit" class="submit" name="action" value="<?php echo </p> <?php if (mode == "Edit") {?> <input type="hidden" name="accesslvl" value="<?php echo <?php } ?> <input type="hidden" name="userid" value="<?php echo userid; ?>"> </form> <?php require_once 'footer.php'; ?>
(C) Æliens 20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.