topical media & game development
basic-php-13-useraccount.php / php
<?php
require_once 'conn.php';
name = '';
password = '';
_GET['userid'])) {
_GET['userid'];
sql, row = mysql_fetch_array(userid = name = email = accesslvl = userid) {
echo "<h1>Modify Account</h1>\n";
} else {
echo "<h1>Create Account</h1>\n";
}
?>
<p>
Full name:<br>
<input type="text" class="txtinput" name="name" maxlength="100"
value="<?php echo htmlspecialchars(email); ?>">
</p>
<?php
if (isset(_SESSION['access_lvl'] == 3)
{
echo "<fieldset>\n";
echo "<legend>Access Level</legend>\n";
result = mysql_query(conn)
or die('Could not list access levels; ' . mysql_error());
while (result)) {
echo ' <input type="radio" class="radio" id="acl_' .
row['access_lvl'] . '" ';
if (accesslvl) {
echo 'checked="checked" ';
}
echo '>' . userid; ?>">
<input type="submit" class="submit" name="action"
value="Modify Account">
</p>
<?php } else { ?>
<p>
Password:<br>
<input type="password" id="passwd" name="passwd" maxlength="50">
</p>
<p>
Password (again):<br>
<input type="password" id="passwd2" name="passwd2" maxlength="50">
</p>
<p>
<input type="submit" class="submit" name="action"
value="Create Account">
</p>
<?php } ?>
</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.