Creation Of Simple Registration Form With Proper Explanation Of Fieldset Concepts, heading Tag Concepts, Constructor Concepts, Function Concepts And Class Concepts In My Own Words

Creation Of Simple Registration Form With Proper Explanation Of Fieldset Concepts, heading Tag Concepts, Constructor Concepts, Function Concepts And Class Concepts In My Own Words

So,here first just let me explain about the fieldset concepts. Why I have use fieldset in my form? I have used fieldset in my form to group all the input fields. Because fieldset itself says that it's function is to group the input fields which the user puts on it's own. That's why I have used fieldset fields.

Now coming to <h3> tag concepts. So, as in my previous blog already I have explained about heading tag concepts i.e. <h1> tag concepts. So, here I am going to explain about <h3> tag concepts. So, <h3> tag concept is nothi9ng but I can say it is heading 3. Means this heading 3 size will be little small in size than heading 1 i.e. <h1> tag.

Now coming to Constructor Concepts. So, constructor is basically who creates objects. Constructor allows the object to initialise itself. Which means that whenever I create any object in a class, constructor is called first.

Now coming to Function concepts. So, let me explain what is function? Function is basically a method inside a class.

Now as I have utter the word class. So, just let me explain about the class concepts. Why I have used class concepts here. So, class is basically a container, which contains a group of functions, variables and other class objects as well. Basically, I can say that class is the blueprint of objects. Now if you tell me to provide the example of class. Then sure, I am ready to go with the example of class. If you ask me about real life examples, then I can say school classroom, college classroomn, tuition class and I don't think that any other examples can be as great as this 3 real life examples. And here I have used class as because here class which I have used is also used for providing styling in CSS like background-color, color, font-size i.e. to increase the size of text, text-align i.e. to align the text in particular position and font-weight i.e. to make the text bold or bolder.

OUTPUT:

After I fill the registration form details and click on submit it will show me the output in the similar way as shown in the image below.


CODING:

<!DOCTYPE html>

<html>

<head>

<meta charset="utf-8">

<meta name="viewport" content="width=device-width, initial-scale=1">

<title>Registration Form</title>

<style type="text/css">

.c1{

background-color: lightcoral;

color: azure;

text-align: center;

font-size: 40px;

}

.c2{

text-align: center;

}

.c3{

text-align: center;

background-color: burlywood;

color: rebeccapurple;

font-weight: bolder;

}

.c4{

background-color: aliceblue;

color: chocolate;

font-weight: bolder;

font-size: 20px;

}

</style>

</head>

<body>

<h3 class="c1">Simple Registration Form</h3>

<div class="c2">

<img src="https://media.istockphoto.com/id/1463013729/photo/online-registration-form-for-modish-form-filling.jpg?s=612x612&w=0&k=20&c=Fnx06haU4IHYLcRpy9Po_TBknvBqVjicGuUWkGu8e6Y=" height="250px" width="250px">

</div>

<form class="c3">

<fieldset>

Type: <input type="radio" name="type" value="personal">Personal

<input type="radio" name="type" value="company">Company<br>

Email: <input type="email" name="email"><br>

Name: <input type="text" name="name"><br>

Password: <input type="password" name="password"><br>

Gender: <input type="radio" name="gender" value="male">Male

<input type="radio" name="gender" value="female">Female<br>

<button type="submit" name="submit" value="submit" class="c4">Submit</button>

</fieldset>

</form>

<?php

if (isset($_REQUEST['submit'])) {

$Type=$_REQUEST['type'];

$Email=$_REQUEST['email'];

$Name=$_REQUEST['name'];

$Password=$_REQUEST['password'];

$Gender=$_REQUEST['gender'];

class RegistrationForm

{

function __construct($Type,$Email,$Name,$Password,$Gender)

{

$this->ty=$Type;

$this->em=$Email;

$this->na=$Name;

$this->pa=$Password;

$this->ge=$Gender;

}

function display()

{

echo $this->ty."<br>".$this->em."<br>".$this->na."<br>".$this->pa."<br>".$this->ge;

}

}

$obj=new RegistrationForm($Type,$Email,$Name,$Password,$Gender);

$obj->display();

}

?>

</body>

</html>





Comments

Popular posts from this blog

Programmings Based On Array And String Functions To Merge The 2 Arrays, Then After Merge Convert Into String And Then Find Out The 1st And Last Word From The Reverse String

PHP WEB DEVELOPMENT INTERVIEW QUESTIONS ASKED IN APOLLO HOSPITAL ALONG WITH MY OWN CONCEPTS AND MY OWN EXPLANATION ANSWERS(PART - 1) REST OF THE QUESTIONS AND ANSWERS WILL BE PREPARED BY ME IN MY NEXT BLOG

Mini Project On Multi User CRUD Operations(Create, Read, Update & Delete) Of Donar Details Of Indian Nationals Who Donate To Ramkrishna Math, Belur Math Using PDO (PHP Data Objects) With Proper Explanation Of Each And Every Individual Line Of The Code Of connection.php Page, form.php Page, formaction.php Page, admin_display.php Page, client_display.php Page, edit.php Page, editaction.php Page And delet.php Page (Here You Will Find The Image Of Sayang Sri Ramkrishna Dev, Sayang Sri Ma Sarada Devi & Sayang Sri Swami Vivekananda) In My CRUD Operation