I don't think this tutorial has been posted before, It may have been but I did search and couldn't find it.
This tutorial will show you Beginners how to Password Protect you webpage and only be able to access it with the chosen password.(explained further down)
So first, you must have a website or use xampp server.
Secondly, open up your desired text editor, I suggest using Notepad++ or Adobe Dreamweaver.
I must say, the code WON'T be avaliable for Copy&Paste. You must write the code yourself. (Code is supplied).
So... Lets get started;
Firstly, open up the PHP tags like this
Second; You need to add the function/variable In between the two quotation marks, insert your password.
WARNING: Potential SPAM or INFECTED LINK image (Click to View)
Ok now we are going to add some html blended in with php, (to make the page look nice)
for that we are going to write this code;
WARNING: Potential SPAM or INFECTED LINK image (Click to View)
Done?... Okay, as you can see the php code in that image ends after the last squiggly bracket( { )
Underneath that closing PHP tag, is where you HTML content goes(What you want to show yourself/others if they have the password). So it would look like this;
WARNING: Potential SPAM or INFECTED LINK image (Click to View)
Okay, so now you need to finish off the PHP using the tags underneath the last part of your code add this to it,
Now we can continue to to finish off the Password Protected Webpage.
Follow on,
Now we need to create the part of the page that show's an error message if the password is typed incorrectly.
This is all blended in with html & php. please type it correctly, or else your code may not work.
WARNING: Potential SPAM or INFECTED LINK image (Click to View)
Once you have done that, you are now ready to upload to your live server or xampp server, your choice..
Your entire code should look something like this(You can edit, change things if you wish)
WARNING: Potential SPAM or INFECTED LINK image (Click to View)
After you have uploaded, navigate to the website & page name.
It should look something sililar to this;(NOTICE: I Created a css layout for mine.)
Completed Webpage (Click to View)
If you got it working correctly, please post here to clarify.
Thank you for reading this tutorial, & I hope you learned something. :)
This tutorial will show you Beginners how to Password Protect you webpage and only be able to access it with the chosen password.(explained further down)
So first, you must have a website or use xampp server.
Secondly, open up your desired text editor, I suggest using Notepad++ or Adobe Dreamweaver.
I must say, the code WON'T be avaliable for Copy&Paste. You must write the code yourself. (Code is supplied).
So... Lets get started;
Firstly, open up the PHP tags like this
PHP Code
<?php
?>Second; You need to add the function/variable In between the two quotation marks, insert your password.
WARNING: Potential SPAM or INFECTED LINK image (Click to View)
Ok now we are going to add some html blended in with php, (to make the page look nice)
for that we are going to write this code;
WARNING: Potential SPAM or INFECTED LINK image (Click to View)
Done?... Okay, as you can see the php code in that image ends after the last squiggly bracket( { )
Underneath that closing PHP tag, is where you HTML content goes(What you want to show yourself/others if they have the password). So it would look like this;
WARNING: Potential SPAM or INFECTED LINK image (Click to View)
Okay, so now you need to finish off the PHP using the tags underneath the last part of your code add this to it,
PHP Code
<?php
}
else
{
Now we can continue to to finish off the Password Protected Webpage.
Follow on,
Now we need to create the part of the page that show's an error message if the password is typed incorrectly.
This is all blended in with html & php. please type it correctly, or else your code may not work.
WARNING: Potential SPAM or INFECTED LINK image (Click to View)
Once you have done that, you are now ready to upload to your live server or xampp server, your choice..
Your entire code should look something like this(You can edit, change things if you wish)
WARNING: Potential SPAM or INFECTED LINK image (Click to View)
After you have uploaded, navigate to the website & page name.
It should look something sililar to this;(NOTICE: I Created a css layout for mine.)
Completed Webpage (Click to View)
If you got it working correctly, please post here to clarify.
Thank you for reading this tutorial, & I hope you learned something. :)


![[Image: U6oGW.png]](https://i.imgur.com/U6oGW.png)
![[Image: Wejx4.png]](https://i.imgur.com/Wejx4.png)
![[Image: dcxnV.png]](https://i.imgur.com/dcxnV.png)
![[Image: tb83H.png]](https://i.imgur.com/tb83H.png)
![[Image: 3rau6.png]](https://i.imgur.com/3rau6.png)
![[Image: KkQL3.png]](https://i.imgur.com/KkQL3.png)
![[Image: dNjfUPi.png]](https://i.imgur.com/dNjfUPi.png)

