├── database.xml ├── home.html ├── register.html ├── style.css ├── addentry.php ├── login.html └── README.md /database.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | user 6 | user 7 | user@example.com 8 | 8888888888 9 | 27 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /home.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |

Welcome to Course Consultation Website

5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 |
QualificationIntrestCourse Suggestion
12thProgrammingC,C++
12thWeb DesignHTML,CSS,JavaScript
12thCar DesignAutoCAD, CATIA
12thRoboticsArtificial Intelligence and Robotics
32 |
33 | 34 | 35 | -------------------------------------------------------------------------------- /register.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /style.css: -------------------------------------------------------------------------------- 1 | body 2 | { 3 | background-image: url("img.jpeg"); 4 | background-repeat: no-repeat; 5 | background-size: cover; 6 | } 7 | a 8 | { 9 | margin: 100px 0 0 36px; 10 | } 11 | .login 12 | { 13 | border: 2px solid; 14 | border-radius: 5px; 15 | height: 200px; 16 | margin: 150px 0 auto 400px; 17 | width: 310px; 18 | border-color:#3498DB; 19 | padding-top: 20px; 20 | } 21 | .register 22 | { 23 | border: 2px solid; 24 | border-radius: 5px; 25 | height: 350px; 26 | margin: 150px 0 auto 400px; 27 | width: 310px; 28 | border-color:#3498DB; 29 | padding-top: 20px; 30 | } 31 | input[type="password"], input[type="text"] 32 | { 33 | border:1px solid; 34 | background-color:rgba(0,0,0,0.0); 35 | height: 33px; 36 | width:240px; 37 | margin: 2px 0 0 36px; 38 | padding-left: 10px; 39 | } 40 | 41 | input[type="submit"] 42 | { 43 | background-color: #4CAF50; 44 | color: white; 45 | height: 42px; 46 | margin: 10px 0 0 36px; 47 | width: 250px; 48 | padding-left: 10px; 49 | } 50 | input[type="submit"]:hover 51 | { 52 | background-image: linear-gradient(#4ec7c0,#31aba3) 53 | } 54 | input[type="submit"]:active 55 | { 56 | background-image: linear-gradient(#319d91, #3db0a6); 57 | padding: 0; 58 | } 59 | -------------------------------------------------------------------------------- /addentry.php: -------------------------------------------------------------------------------- 1 | preserveWhiteSpace = false; 4 | $xmldoc->formatOutput = true; 5 | 6 | $name = $_POST['username']; 7 | $pass = $_POST['password']; 8 | $mobile = $_POST['mobile']; 9 | $email = $_POST['email']; 10 | $age = $_POST['age']; 11 | 12 | if( $xml = file_get_contents( 'database.xml') ) { 13 | $xmldoc->loadXML( $xml, LIBXML_NOBLANKS ); 14 | 15 | // find the headercontent tag 16 | $root = $xmldoc->getElementsByTagName('profile')->item(0); 17 | 18 | // create the tag 19 | $account = $xmldoc->createElement('account'); 20 | 21 | 22 | // add the product tag before the first element in the tag 23 | $root->insertBefore( $account, $root->lastChild ); 24 | 25 | // create other elements and add it to the tag. 26 | $nameElement = $xmldoc->createElement('name'); 27 | $account->appendChild($nameElement); 28 | $nameText = $xmldoc->createTextNode($name); 29 | $nameElement->appendChild($nameText); 30 | 31 | $passElement = $xmldoc->createElement('pass'); 32 | $account->appendChild($passElement); 33 | $passText = $xmldoc->createTextNode($pass); 34 | $passElement->appendChild($passText); 35 | 36 | $emailElement = $xmldoc->createElement('email'); 37 | $account->appendChild($emailElement); 38 | $emailText = $xmldoc->createTextNode($email); 39 | $emailElement->appendChild($emailText); 40 | 41 | $mobileElement = $xmldoc->createElement('mobile'); 42 | $account->appendChild($mobileElement); 43 | $mobileText = $xmldoc->createTextNode($mobile); 44 | $mobileElement->appendChild($mobileText); 45 | 46 | $ageElement = $xmldoc->createElement('age'); 47 | $account->appendChild($ageElement); 48 | $ageText = $xmldoc->createTextNode($age); 49 | $ageElement->appendChild($ageText); 50 | 51 | 52 | $xmldoc->save('database.xml'); 53 | } 54 | ?> 55 | 56 | 57 | 58 |

You are Successfully Register pleasego to Login page

59 | 60 | 61 | -------------------------------------------------------------------------------- /login.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 17 | 18 | 72 | 73 | 74 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Ajax-HTML-CSS-PHP-Implementation 2 | # 1. PHP 3 | The PHP Hypertext Preprocessor (PHP) is a programming language that allows web 4 | developers to create dynamic content that interacts with databases. PHP is basically used for 5 | developing web based software applications. 6 | PHP has a total of eight data types which we use to construct our variables − 7 | Integers − are whole numbers, without a decimal point, like 4195. 8 | Doubles − are floating-point numbers, like 3.14159 or 49.1. 9 | Booleans − have only two possible values either true or false. 10 | NULL − is a special type that only has one value: NULL. 11 | Strings − are sequences of characters, like 'PHP supports string operations.' 12 | Arrays − are named and indexed collections of other values. 13 | Objects − are instances of programmer-defined classes, which can package up both 14 | other kinds of values and functions that are specific to the class. 15 | Resources − are special variables that hold references to resources external to PHP 16 | # PHP MySQL Connectivity 17 | https://www.w3schools.com/php/php_mysql_connect.asp 18 | 19 | # 2. AJAX 20 | AJAX stands for Asynchronous JavaScript and XML. AJAX is a new technique for creating 21 | better, faster, and more interactive web applications with the help of XML, HTML, CSS, and 22 | Java Script. 23 |  Ajax uses XHTML for content, CSS for presentation, along with Document Object 24 | Model and JavaScript for dynamic content display. 25 |  Conventional web applications transmit information to and from the sever using 26 | synchronous requests. It means you fill out a form, hit submit, and get directed to a 27 | new page with new information from the server. 28 |  With AJAX, when you hit submit, JavaScript will make a request to the server, 29 | interpret the results, and update the current screen. In the purest sense, the user would 30 | never know that anything was even transmitted to the server. 31 |  XML is commonly used as the format for receiving server data, although any format, 32 | including plain text, can be used. 33 |  AJAX is a web browser technology independent of web server software. 34 |  A user can continue to use the application while the client program requests 35 | information from the server in the background. 36 |  Intuitive and natural user interaction. Clicking is not required, mouse movement is a 37 | sufficient event trigger. 38 |  Data-driven as opposed to page-driven. 39 | 40 | # The XMLHttpRequest Object 41 | All modern browsers support the XMLHttpRequest object. The XMLHttpRequest object can 42 | be used to exchange data with a server behind the scenes. This means that it is possible to 43 | update parts of a web page, without reloading the whole page. 44 | var xhttp = new XMLHttpRequest(); 45 | Send a Request To a Server 46 | To send a request to a server, we use the open() and send() methods of the XMLHttpRequest 47 | object: 48 | xhttp.open("GET", "ajax_info.txt", true); 49 | xhttp.send(); 50 | # Property Description 51 | onreadystatechange Defines a function to be called when the readyState property changes 52 | readyState Holds the status of the XMLHttpRequest.  53 | If readyState= 54 | 0: request not initialized  55 | 1: server connection established 56 | 2: request received  57 | 3: processing request  58 | 4: request finished and response is ready 59 | 60 | --------------------------------------------------------------------------------