PHP background data processing and web-side data interaction

Source: Internet
Author: User
: This article mainly introduces PHP background data processing and data interaction with the web end. if you are interested in the PHP Tutorial, please refer to it. I. What is PHP?
PHP (foreign name: PHP: Hypertext Preprocessor, Chinese name: "Hypertext Preprocessor") is a common open source scripting language. The syntax absorbs the features of C, Java, and Perl, which is easy to learn and widely used and mainly applies to the Web development field. PHP's unique syntax is a mix of C, Java, Perl, and PHP's own syntax. It can execute dynamic web pages more quickly than CGI or Perl. The execution efficiency is much higher than the CGI that completely generates the HTML tag. PHP can also execute the compiled code to encrypt and optimize code execution, so that the code runs faster.

2. which common languages can write background data?
1 JAVA, LUA (more embedded web terminals),. net, asp, and php websites are mostly used in the background.
Third, what is Apache?
Apache HTTP Server (Apache) is an open source web Server of the Apache Software Foundation. it can run in most computer operating systems. it is widely used for its multi-platform and security, is one of the most popular Web server software. It is fast, reliable, and can be used to compile interpreters such as Perl/Python into the server through simple API extensions.
Main code: the specific environment configuration will not be discussed here


  ");} Else {// echo (" connection failed "."
");} // Select the database to operate, which is equivalent to opening the database. $ Value = $ _ GET ["username"]; $ value1 = $ _ GET ["password"]; mysql_select_db ("lyg "); // prepare the SQL statement $ SQL = sprintf ("select username from account where username = '% s'", $ value); // execute the SQL statement, $ result = mysql_query ($ SQL); // you can use the while loop to obtain all results. $ dic = mysql_fetch_array ($ result ); // Determine whether username in the search result is null if (empty ($ dic ["username"]) {$ sqls = sprintf ("insert into account (username, password) values ('% s',' % S ') ", $ value, $ value1); $ result = mysql_query ($ sqls); if ($ result) {// echo (" inserted successfully "); $ resultDic = array ("resultMess" => "registered", "resultCode" => "100", "userID" => "201632 "); echo (json_encode ($ resultDic) ;}} else {$ resultDic = array ("resultMess" => "registered already exists", "resultCode" => "200 ", "userID" => "201632"); echo (json_encode ($ resultDic);}/* class MyClass {protected function myFunc () {echo "MyClass: myFunc () \ n ";}} class Ot HerClass extends MyClass {// overwrite the definition of the parent class public function myFunc () {// but you can still call the override method parent: myFunc () in the parent class (); echo "OtherClass: myFunc () \ n" ;}}$ class = new OtherClass (); $ class-> myFunc (); */?>

'). AddClass ('pre-numbering '). hide (); $ (this ). addClass ('Has-numbering '). parent (). append ($ numbering); for (I = 1; I <= lines; I ++) {$ numbering. append ($ ('
  • '). Text (I) ;}; $ numbering. fadeIn (1700) ;}) ;}; script

    The above introduces the PHP background data processing and data interaction with the web end, including content, hope to be helpful to friends who are interested in the PHP Tutorial.

    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.