Mysql-based Forum (2) _ PHP Tutorial

Source: Internet
Author: User
Mysql-based Forum (2 ). ################################### Apply. php ####################################### ############# titlemetahttp-equivContent-Typecontenttexthtm ################## ###############
# Apply. php ####################
#################################


Registered user








Register a new user














Registration Notice: <br> A user can post and reply to a new post only after registration. Non-registered users can only view posts. <Br> in a registered project, "*" indicates the project that you must enter, and other items are optional. However, for the convenience of contact, it is best to write the detailed information. <Br> The Forum does not welcome politically sensitive topics. if disputes arise, the forum's user managers are not responsible. <Br> 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. <Br> Production: cool












######################################## ##
# Chklogin. 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
";

$ 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 ());

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

Http://www.bkjia.com/PHPjc/316358.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/316358.htmlTechArticle################################# # apply. php ####################################### ############# html head title registered user/title meta http-equiv = Content-Type content = text/htm...

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.