Reply. php (used to reply to a topic) problem If (! $ Cook_user){Echo " ";}Else {include ("connect. inc. php ");$ Query = "select * from my_user where user = '". $ cook_user. "' and password = '". $ cook_password ."'";$ Res = mysql_query ($ query
Config. php file// Your username and password, as well as the database name, and table name are defined here !!!// For fear that the user name and password will be viewed by others through the browser, the php extension will be used, so you will not
Accelerate PHP database development with classesThere are many database access functions. improper use may reduce efficiency and even lead to errors. PHP itself is open and extensible, and many people develop the source code of various features for
Copy codeThe Code is as follows:Require_once ("mssql. class. php ");// 1. Create a class and connect to the database$ Db = new mssql ("dns = aaa; uid = sa; pwd = sa; dbname = test ");// 2. Connect to the database$ Conn = $ db-> config ("dns = aaa;
Instance code:Copy codeThe Code is as follows:/****************************************** ******************** Read Me* Article pagination** Paging mode: Paging by words, line feed, and special mark* In fact, the implementation idea is the same,
Copy codeThe Code is as follows:/*** Quick sort***/Function sort_quick ($ arrData ){If (empty ($ arrData) |! Is_array ($ arrData) return false;$ Flag = $ arrData [0];$ Len = count ($ arrData)-1;If ($ len = 0) return $ arrData; // if only one data
Environment:-Apache 2.2.6-PHP 5.2.5-SQL Server 2005-Windows XP SP2Steps: 1. Configure PHP5 to connect to ms SQL Server as usual2. Download the correct version of ntwdblib. dll (2000.80.194.0). Note that this version number does not work for this
Syntax
sprintf(format,arg1,arg2,arg++)
Parameters
Description
Format
Required. Conversion format.
Arg1
Required. Specifies the parameter inserted at the first % symbol in the format string.
Arg2
The following code is a timestamp provided by most people on the Internet. At first glance, it can only be said that the current date is obtained, rather than the timestamp. Do not explain it more!Copy codeThe Code is as follows:$ Now = mktime (0, 0,
In the past two days, we need to implement the following functions:When a certain condition is reached, the server sends a text message to the user. The number of messages is multiple.Basic Idea: scheduled linux scanning. If a user meets the
Although this feature is very easy to program using PHP, it also has an important drawback: When you need to test the type of a variable, the language with loose processing types is confusing. Fortunately, PHP developers noticed this situation and
IntroductionThe observer mode defines the one-to-many dependency of an object. In this way, when an object changes its status, all its dependent persons will receive notifications and update them automatically!Design principlesIn the observer mode,
Background and overviewAs early as a few years before SQL injection went viral, String Conversion into integers has been listed as a required operation for every web program. The web program forcibly converts the id and integer equivalent values
Recently, I made a voting system for the entertainment portal, which is also overwhelmed by votes. All available methods are used. However, they are not ideal. Finally, I figured out the following method and made a flowchart to share with you.If you
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