Mysql-based forum (2)

Source: Internet
Author: User

#################################
# Apply. php ####################
#################################
<HTML>
<Head>
<Title> Registered User </title>
<Meta http-equiv = "Content-Type" content = "text/html; charset = gb2312">
<LINK rel = "stylesheet" type = "text/CSS" href = "CSS/index.css">
</Head>
<Body bgcolor = "# ffffff" background = "image/bg.gif">
<? PHP Include "header. php";?>
<Br>
<HR noshade width = "97%" size = "1">
<Div align = "center"> registering a new user <br>
</Div>
<Table width = "90%" border = "1" cellspacing = "0" cellpadding = "0" bordercolorlight = "#336699" bordercolordark = "# ffffff" align = "center">
<Tr>
<TD colspan = "2">
<Div align = "center">
<Textarea name = "Temp" Wrap = "virtual" Cols = "60" rows = "8"> registration instructions:

Users can send new posts and reply to posts only after registration. Non-registered users can only view posts.
When registering a project, the project with "*" must be filled in, and other items are optional. However, for the convenience of contact, it is best to write the detailed information.
This forum does not welcome politically sensitive topics. If disputes arise, managers of this forum are not responsible.
After registration, add 5 points for each post, reply to an article, add 3 points, delete an article, and deduct 4 points. Points are only for the purpose of activating the Forum atmosphere and do not represent some level of netizens.

Production: Cool-hearted </textarea>
</Div>
</TD>
</Tr>
<Tr valign = "TOP">
<TD colspan = "2"> </TD>
</Tr>
<Tr>
<TD colspan = "2">
<Form method = "Post" Action = "adduser. php">
<Table width = "80%" border = "0" cellspacing = "0" cellpadding = "3" align = "center">
<Tr>
<TD align = "right"> User Name </TD>
<TD>
<Input type = "text" name = "name" maxlength = "16" style = "font-size: 9pt; Background-color: # ffffff; color: # ff0000; Border: 1 solid #000000 ">
* </TD>
</Tr>
<Tr>
<TD align = "right"> password </TD>
<TD>
<Input type = "password" name = "pwd1" maxlength = "8" style = "font-size: 9pt; Background-color: # ffffff; color: # ff0000; Border: 1 solid #000000 "size =" 9 ">
* </TD>
</Tr>
<Tr>
<TD align = "right"> duplicate password </TD>
<TD>
<Input type = "password" name = "pwd2" maxlength = "8" style = "font-size: 9pt; Background-color: # ffffff; color: # ff0000; Border: 1 solid #000000 "size =" 9 ">
* </TD>
</Tr>
<Tr>
<TD align = "right"> email </TD>
<TD>
<Input type = "text" name = "email" style = "font-size: 9pt; Background-color: # ffffff; color: # ff0000; Border: 1 solid #000000 ">
</TD>
</Tr>
<Tr>
<TD align = "right"> gender </TD>
<TD>
<Select name = "sex">
<Option value = "secret" selected> secret </option>
<Option value = "male"> male </option>
<Option value = ""> female </option>
</SELECT>
</TD>
</Tr>
<Tr>
<TD align = "right"> authenticity name </TD>
<TD>
<Input type = "text" name = "realname" size = "17" maxlength = "16" style = "font-size: 9pt; Background-color: # ffffff; color: # ff0000; Border: 1 solid #000000 ">
</TD>
</Tr>
<Tr>
<TD align = "right"> address </TD>
<TD>
<Input type = "text" name = "Address" maxlength = "40" size = "30" style = "font-size: 9pt; Background-color: # ffffff; color: # ff0000; Border: 1 solid #000000 ">
</TD>
</Tr>
<Tr>
<TD align = "right"> phone number </TD>
<TD>
<Input type = "text" name = "phone" size = "22" maxlength = "20" style = "font-size: 9pt; Background-color: # ffffff; color: # ff0000; Border: 1 solid #000000 ">
</TD>
</Tr>
<Tr>
<TD align = "right"> homepage </TD>
<TD>
<Input type = "text" name = "Homepage" style = "font-size: 9pt; Background-color: # ffffff; color: # ff0000; Border: 1 solid #000000 "size =" 50 "value =" http: // ">
</TD>
</Tr>
<Tr>
<TD align = "right"> OICQ </TD>
<TD>
<Input type = "text" name = "OICQ" maxlength = "11" style = "font-size: 9pt; Background-color: # ffffff; color: # ff0000; Border: 1 solid #000000 "size =" 12 ">
</TD>
</Tr>
<Tr>
<TD align = "right"> signature </TD>
<TD>
<Textarea name = "QM" Wrap = "virtual" Cols = "50"> </textarea>
</TD>
</Tr>
<Tr>
<TD align = "right"> </TD>
<TD align = "center">
<Input type = "Submit" name = "B1" value = "register">
<Input type = "reset" name = "submit2" value = "clear">
</TD>
</Tr>
</Table>
</Form>
</TD>
</Tr>
</Table>
<Br>

<? PHP Include "footer. php";?>

</Body>
</Html>
######################################## ##
# Chklogin. php #########################
########################################
<? PHP
Require ("func. php ");
$ Name = trim ($ name );
$ Password = trim ($ password );
$ SQL = "select * from user where name = '$ name '";
$ SQL _result = mysql_query ($ SQL );
$ SQL _row = mysql_fetch_array ($ SQL _result );
If ($ Password = $ SQL _row [Password]) and (! Empty ($ SQL _row [slaveboard]) {
Setcookie ("jl_forum [Board]", $ SQL _row [slaveboard]);
Setcookie ("jl_forum [name]", $ name );
Setcookie ("jl_forum [Password]", $ password );
Redirect2 ("manage_list.php ");
}
Else {
Show_error (4 );
}
?>
###################################
##### Config. Inc. php ##########
#############################
<?

$ Mysql_hostname = "localhost ";
$ Mysql_username = "root ";
$ Mysql_password = "";

$ Database = "Forum ";

$ Pagesize = 25;

$ Copyright = "Copyright 2000, by edincur, all rights reserved <br> ";

$ Admin_email = "your_email ";

$ Admin_name = "your_admin_name"; # name of the forum administrator
$ Admin_password = "your_password"; # forum administrator password

$ Remove_score = 4; # Score deducted from a deleted article
$ New_topic_score = 5; # score of the new topic
$ Re_topic_score = 3; # reply to a score

Mysql_connect ($ mysql_hostname, $ mysql_username, $ mysql_password );
Mysql_select_db ($ database) or die (mysql_error ());

?>
###############################
#

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.