topical media & game development
professional-sql-02-public-files-add-forum.php / php
<?php
// include shared code
include '../lib/common.php';
include '../lib/db.php';
include '../lib/functions.php';
include '../lib/User.php';
// 401 file included because user should be logged in to access this page
include '401.php';
// user must have appropriate permissions to use this page
_SESSION['userId']);
if (~forum_name = (isset(_POST['forum_name']) : '';
_POST['forum_desc'])) ? trim(_POST['submitted']) && forum_desc)
{
forum_name, forum_desc, query, _POST['submitted']))
{
message))
{
echo _SERVER['PHP_SELF']); ?>"
method="post">
<div>
<label for="forum_name">Forum Name:</label>
<input type="input" id="forum_name" name="forum_name" value="<?php
echo htmlspecialchars(forum_desc); ?>"/>
<br/>
<input type="hidden" name="submitted" value="true"/>
<input type="submit" value="Create"/>
</div>
</form>
<?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.