Creation Of SignUp Form Page Using OOPS Constructor Method
Creation Of SignUp Form Page Using OOPS Constructor Method
OUTPUT PAGE:
Here in my below output page I have shown that once I fill up the details and click on the "SIGN UP" button, it will show me the output as shown in the below image.
Now just let me explain the whole code which I have executed. So, let's begin.
At first just let me explain why I have taken <div> tag? And what is <div> tag actually? So, as I know that <div> tag is basically known as division, which actually works as to divide each input field which I am taking in form. And also in <div> tag I can take a class name whose id I can use in CSS styling.
So, as I have already talked about CSS styling, just let me explain what is CSS? and why I use CSS? Basically CSS is known as "Cascading Style Sheets". And I use CSS because of styling purpose to give the color, background, colour, to make the text bold or bolder to increase the size of the text which I have executed in my code as shown below.
<style type="text/css">
.b1{
text-align: center;
background-color: blue;
color: yellow;
}
.b2{
text-align: center;
}
.b3{
background-color: lightseagreen;
color: darkred;
font-size: 20px;
font-weight: bolder;
text-align: center;
}
.b4{
color: darkgreen;
font-weight: bolder;
background-color: yellow;
}
</style>
Now let me explain what is <h1> tag? Basically first about <h1> tag I need to know how many <h> tags are basically their. Basically, as per I know, we have 6 <h> tags, starting from <h1> tag to <h6> tag. Now directly coming to what is <h1> tag? So, <h1> tag is basically a heading tag. And why it is mentioned as <h1> tag, <h2> tag, <h3> tag, <h4> tag, <h5> tag, <h6> tag? Because each heading tag has each and individual size. Where <h1> tag is the most largest size and <h6> tag is the most smallest size.
Now let me explain why I have used the image url inside <img> tag? I have used the image url inside <img> tag as because to display the image itself. And if I don't provide the image url inside <img> tag then I will not able to see the image, I can only see the image url. And I have used the height and width inside <img> tag to set the size of the image.
Now let me explain why I have taken form? I have taken form basically for collecting the user input means the input fields which I am providing inside my form. And Form also helps to input the fields which the user wants and to click on the submit button to sent the request directly to the server.
Now let me explain why I have used method as post inside my form? I have used method as post inside my form as because post method is the most secure method and post method doesn't pass query string. So, now you may ask me can't I use get method? Yes, obviously, you can use get method but generally we don't. Because get method is not the secure method as well as it passes query string.
Now just let me explain why I have used isset() function in my if condition. I have used isset() function as because isset() function is used to set the variable, which means the variable should exists and it should not be NULL. isset() function basically sents TRUE if the variable exists and is not NULL> otherwise it sents FALSE.
Now let me explain what is __construct() function? so, __ construct() function is the magic keyword where double underscore(__) is required.
Comments
Post a Comment