I'll call you back again to another video lecture in PHP.
In this video lecture we go ahead and look at git and post in PHP.
All right so we'll try this course.
We have been looking at Getmethod and how we can actually see that our index method, we always print
our things.
And in the URL that is always shown.
And what if you are going to enter credit card numbers.
You want to enter passwords.
Are you going to allow these things to be shown on the URL.
So that is the question of comes to mind as a developer.
So how can you be able to hide these.
That is import as of this video lecture.
Now let's go ahead and create a form.
And I'll go ahead and say form.
And then go ahead and close my form.
So that is closed.
And then let's go here and give action.
And we are still working with sites dot, p, h b and then we go ahead and give the method and let the
method the equal to get.
So we are going to start with get.
And then I will show you how we can be able to correct this.
Now let's go ahead and see.
We have a password.
And I just give a prompt password.
And then we are going to have an input password and let it type be equal to password.
And then let the name be equal to password.
Then we go ahead and close this.
All right.
Now let's go ahead and put a brick so that this goes to another uh line.
I'm going to shift this a little bit.
So now let's go ahead and add a submit button.
So input and uh let the type be equal to submit.
And then we'll will go ahead and close this.
So now we have to create a form.
And if we go ahead and refresh this we can see we have this form right in here.
All right.
So let's go ahead and drag this a little bit because I want this to be all right.
So I just okay let's remove the break so that this will go in one line because I just wanted it to go
to the next line.
All right.
So I have this in one line and that is looks good and looks better.
Now if I go over to PHP let's go to PHP and equal whatever we want and let's say dollar sign underscore
get.
And then we go ahead and pass password a rank ahead of semicolon at the end.
And let's go ahead in here and inserted password.
And I'm going to say that the password is going to be equal to.
So right now you don't see what I put in.
So for the client side.
You know, whatever you do.
And if I should go ahead and submit this password, and I click that twice, let's go ahead and do that
again.
So go ahead and submit this password.
Now you can see I have my password showing up here and down here I have judge still.
So this is the password I entered.
And you can see I have password right in here.
Password equal to judge still.
So you can see that this is not really secured because on the URL parameter it can be able to see your
password.
And in case you put in a credit card number let's go ahead and say you put some credit card number and
you submitted that to make payment.
And it goes out there and show it means that on the history page, people can actually go to your history
and pick whatever that is in there.
So the major reason why we are doing this lecture is to find a way to be able to tackle this.
We want to post the password right in here.
But what?
We don't want a password to be shown up here.
So how can we be able to do this.
So that is the question right now.
So in order to solve this problem in PHP it is solvable.
And it is very simple.
So as a PHP developer we have what is called a post and get.
So what we have been using throughout this course and before now or we have been using before now is
the post is the Get method.
So right now I'll go ahead and introduce you to the post method.
So go over to method and remove the gate and type in post.
So this single four letter words can be able to change this.
For once you do this you go right in here under the PHP and change the get to post as well.
And then we go ahead and save this.
Let's refresh this.
And uh that is gone.
So now let's go ahead and type in this again.
So I'll go back and insert the judge Steve, as the password.
And uh, I don't know what I get it right.
So let's go ahead and uh, do that again and let's go ahead and submit this so we can see I have Steve.
Now check out the URL parameter.
You can see that, uh, nothing is ever displayed there again.
Wow.
That is cool.
Right.
So truly, cause we learned, uh, about getmethod, and now we are learning about, uh, post method.
And you can see that as a PHP developer Post method gives you more security than the Get method.
So most of the things you'll be developing, we are going to be using the post method instead of the
get method, because the get method will actually display that on the URL parameter, which is not actually
good.
So what can we do?
Client side and the server suicide.
In PHP, we always going to use the post method to be able to make things to be more secure and more
better, and having a clean URL that doesn't have so many things on there so that whatever we collect,
we actually just post it without just using the get, you understand?
So we are going to use the Get method.
And henceforth so can we use the post method.
Henceforth in this class.
So can be able to see how good it is.
So go ahead and check it out.
Practice with me.
Try other things username the password or try to enter your login details and cool and it is better.
We use the post method for this, so check it out and practice with it.
And if you have any question, you go ahead and use the question and answer section.
And I'm going to get back to you as soon as possible.
Thank you so much.
And I'm going to see you in the next video lecture.