topical media & game development
professional-sql-02-public-files-main.php / php
<?php
// include shared code
include '../lib/common.php';
include '../lib/db.php';
include '../lib/functions.php';
include '../lib/User.php';
// 401 file referenced since user should be logged in to view this page
include '401.php';
// generate user information form
_SESSION['userId']);
ob_start();
?>
<form action="<?php echo htmlspecialchars(user->username; ?>"/></td>
</tr><tr>
<td><label for="email">Email Address</label></td>
<td><input type="text" name="email" id="email"
value="<?php echo (isset(_POST['email']) : form = ob_get_contents();
ob_end_clean();
// show the form if this is the first time the page is viewed
if (!isset(GLOBALS['TEMPLATE']['content'] = password1 = (isset(_POST['password1']) ?
sha1(user->password;
_POST['password2']) && _POST['password2']) : password = (password2) ? _POST['email']) && user->emailAddr = user->password = user->save();
GLOBALS['TEMPLATE']['content'] .= '<p><strong>You provided some ' .
'invalid data.</strong></p>';
form;
}
}
// display the page
include '../templates/template-page.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.