PHP combined with Ajax to implement a small demo_php instance of login verification

Source: Internet
Author: User

Ajax, "Asynchronous JavaScript and XML" (Asynchronous JavaScript and XML), refers to a web development technology that creates interactive Web applications.

AJAX = Asynchronous JavaScript and XML (asynchronous JavaScript and XML).
AJAX is not a new programming language, but a new way of using existing standards.
AJAX is the art of exchanging data with the server and updating parts of the Web page without reloading the entire page.

Design a user registration page, when the user enters the registration name, detects whether the user name already exists, if exists, gives the prompt

Let's play index.php first.

 

welcome.php

<?php 
Header ("content-type:text/html;charset=gb2312"); 
Sleep (1); 
$userId =$_get["UserId"]; 
if ($userId = = "Admin") { 
echo "username already exists!"; 
} else{ 
echo "This user name can be registered"; 
} 

About PHP and Ajax combined to achieve login verification of the relevant knowledge of small demo to everyone here, I hope to help!

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.