01. .container {
02. max-width : 1350px ;
03. width: 100% ;
04. margin : 50px ;
05. height : auto ;
06. display : block ;
07. }
08.
09. body {
10. color : #8A2BE2 ;
11. font-size : 20px ;
12. font-family : Verdana , Arial , Helvetica, monospace;
13. background-color : #F0E8A0 ;
14. }
15.
16. h 2 {
17. text-align : center ;
18. }
19.
20. .form_group {
21. padding: 10px ;
22. ;
23. display : block ;
24. }
25.
26. label {
27. float: left ;
28. padding-right : 50px ;
29. line-height : 10% ;
30. display : block ;
31. width: 208px ;
32. }
02. max-width : 1350px ;
03. width: 100% ;
04. margin : 50px ;
05. height : auto ;
06. display : block ;
07. }
08.
09. body {
10. color : #8A2BE2 ;
11. font-size : 20px ;
12. font-family : Verdana , Arial , Helvetica, monospace;
13. background-color : #F0E8A0 ;
14. }
15.
16. h 2 {
17. text-align : center ;
18. }
19.
20. .form_group {
21. padding: 10px ;
22. ;
23. display : block ;
24. }
25.
26. label {
27. float: left ;
28. padding-right : 50px ;
29. line-height : 10% ;
30. display : block ;
31. width: 208px ;
32. }
Here you would be wondering why I have used <div> i n HTML. Let me explain to you the importance of using
<div> .
The <div> element is often used as a layout tool.
We need to see how to use them later on in the body section of the page. To use your class, all you need to do is add the class=" " attribute to the tag you wish to have the style of your class. So, if you wanted a line of text to be read, you could add the class attribute to a <DIV> tag, like this:
<div class="form_group"> . Here we have used this class because we can directly apply CSS on this class. The tags which has been opened should be closed also.
Now let us move further.
<div> .
The <div> element is often used as a layout tool.
We need to see how to use them later on in the body section of the page. To use your class, all you need to do is add the class=" " attribute to the tag you wish to have the style of your class. So, if you wanted a line of text to be read, you could add the class attribute to a <DIV> tag, like this:
<div class="form_group"> . Here we have used this class because we can directly apply CSS on this class. The tags which has been opened should be closed also.
Now let us move further.
Step 4 : Apply CSS on the HTML code. General rules for applying CSS are:
We use dot(.) beside any class to apply effects into it and ‘#’ tag before any ID. E.g .
.container {
// css attributes will be written here
}
Here I have taken container as a class. Class is user-defined.
Note: Save the Sign_Up page in the xampp folder->htdocs->create a new folder( user-defined) . Inside this new folder, you have to keep all the data related to your project. It may be any kind of images used in webpage, HTML coding, or CSS coding. I mean to say all the things that are used in creating a web page must be under one roof (i.e under one folder).
We use dot(.) beside any class to apply effects into it and ‘#’ tag before any ID. E.g .
.container {
// css attributes will be written here
}
Here I have taken container as a class. Class is user-defined.
Note: Save the Sign_Up page in the xampp folder->htdocs->create a new folder( user-defined) . Inside this new folder, you have to keep all the data related to your project. It may be any kind of images used in webpage, HTML coding, or CSS coding. I mean to say all the things that are used in creating a web page must be under one roof (i.e under one folder).
Next, we will insert data into the fields of the sign_up page and store the information in MySQL.
For that, we have to start the xampp controller. Start Apache and MYSQL in the XAMPP controller.
Now we will go to the next level where we will make use of PHP syntax.
For that, we have to start the xampp controller. Start Apache and MYSQL in the XAMPP controller.
Now we will go to the next level where we will make use of PHP syntax.
PHP
PHP is a server-side scripting language designed for web development but also used as a general-purpose programming language. PHP is an acronym for " PHP: Hypertext Preprocessor".
PHP is a widely-used, open-source scripting language. PHP scripts are executed on the server. PHP is free to download and use. PHP code is executed on the server, and the result is returned to the browser as plain HTML. PHP files have extension " .php ". PHP can collect form data.
PHP can add, delete, modify data in your database. It runs on various platforms (Windows, Linux, Unix, Mac OS X, etc.) and supports a wide range of databases. PHP is easy to learn and runs efficiently on the server-side.
PHP is a server-side scripting language designed for web development but also used as a general-purpose programming language. PHP is an acronym for " PHP: Hypertext Preprocessor".
PHP is a widely-used, open-source scripting language. PHP scripts are executed on the server. PHP is free to download and use. PHP code is executed on the server, and the result is returned to the browser as plain HTML. PHP files have extension " .php ". PHP can collect form data.
PHP can add, delete, modify data in your database. It runs on various platforms (Windows, Linux, Unix, Mac OS X, etc.) and supports a wide range of databases. PHP is easy to learn and runs efficiently on the server-side.
PHP Variables (Rules)
A variable starts with the $ sign, followed by the name of the variable.
A variable name must start with a letter or the underscore character.
A variable name cannot start with a number.
Variable names are case-sensitive ($age and $AGE are two different variables).
Output Variable
The PHP ‘ echo’ statement is often used to output data to the screen.
PHP FORMS
Write Html coding for sign_up page and save it as
index.php . Again create a PHP page named
connection.php where we will write the code for creating a connection with the database.
A variable starts with the $ sign, followed by the name of the variable.
A variable name must start with a letter or the underscore character.
A variable name cannot start with a number.
Variable names are case-sensitive ($age and $AGE are two different variables).
Output Variable
The PHP ‘ echo’ statement is often used to output data to the screen.
PHP FORMS
Write Html coding for sign_up page and save it as
index.php . Again create a PHP page named
connection.php where we will write the code for creating a connection with the database.
01. <?php
02. $servername = "localhost" ;
03. $username = "root" ;
04. $password = "";
05. $conn = mysql_connect ( $servername , $
( "unable to connect to host" );
06. $sql = mysql_select_db ( 'test' ,
$conn ) or die
( "unable to connect to database" );
07. ?>
02. $servername = "localhost" ;
03. $username = "root" ;
04. $password = "";
05. $conn = mysql_connect ( $servername , $
( "unable to connect to host" );
06. $sql = mysql_select_db ( 'test' ,
$conn ) or die
( "unable to connect to database" );
07. ?>
Next we will continue from php stay connected share and join our channel
How to install Apache webserver with #php and mysql on windows computer.
On the easy way download XAMPP
link xampp
https://www.apachefriends.org/download.html
CHOOSE your computer OS and download it and then install it just like any other softwares
On the easy way download XAMPP
link xampp
https://www.apachefriends.org/download.html
CHOOSE your computer OS and download it and then install it just like any other softwares
www.apachefriends.org
Download XAMPP
Download XAMPP for Windows, Linux, and OS X. Older versions of Solaris are also available.
☝️☝️☝️☝️☝️☝️☝️☝️☝️
If you see this icon on your computer you are success fully install apache web server
If you see this icon on your computer you are success fully install apache web server
If you see
Apache-----------running
Mysql-------------running
You have installed php apache and mysql on your computer
Apache-----------running
Mysql-------------running
You have installed php apache and mysql on your computer
Now check it if it works or not open any browser on your computer
Type the following link
http://localhost
Or click on Admin inside xampp control pannel click
If you see this pictures it works and now you have a local server
Type the following link
http://localhost
Or click on Admin inside xampp control pannel click
If you see this pictures it works and now you have a local server
Now let see were we put our script file
Open #this_pc ->c->xampp->htdocs
Or
C:\xampp\htdocs
folder is your #server_root.
When you open this folder you see lot of files including #index.php
This #index.php means when you type http://loclalhost on your browser it is the file that loaded.
Next inside #htdocs folder we oper new folder to store our projects or codes
And now we make it #xampp #serverroot #Document\root
now
➊now create new folder inside htdocs folder call it #myweb
➋ next double click on xampp then click on #config in the first line then choose #Apache(httpd.conf) from the list
When it opens on notpad click on
Ctrl+F then type DocumentRoot
Then click on find next
Then change
DocumentRoot "/xampp/htdocs"
Into
DocumentRoot "/xampp/htdocs/myweb"
Then Ctrl+s and close notepad
Then restart apache on xampp
now go to your browser and type #http://localhost and hit enter
we have changed our document root.
Open #this_pc ->c->xampp->htdocs
Or
C:\xampp\htdocs
folder is your #server_root.
When you open this folder you see lot of files including #index.php
This #index.php means when you type http://loclalhost on your browser it is the file that loaded.
Next inside #htdocs folder we oper new folder to store our projects or codes
And now we make it #xampp #serverroot #Document\root
now
➊now create new folder inside htdocs folder call it #myweb
➋ next double click on xampp then click on #config in the first line then choose #Apache(httpd.conf) from the list
When it opens on notpad click on
Ctrl+F then type DocumentRoot
Then click on find next
Then change
DocumentRoot "/xampp/htdocs"
Into
DocumentRoot "/xampp/htdocs/myweb"
Then Ctrl+s and close notepad
Then restart apache on xampp
now go to your browser and type #http://localhost and hit enter
we have changed our document root.
Now create test.php file in side your document root or myweb folder
Then type this code.
<?php
echo "hello world";
?>
Then save it and close
Go to your browser and type
http://localhost/test.php/
Then type this code.
<?php
echo "hello world";
?>
Then save it and close
Go to your browser and type
http://localhost/test.php/
Enough for today good night if you have any comments @HTM_beginner_bot put it here