Articles on PHP Category


How to create a custom archive page template on your website layout image
How to create a custom archive page template on your website layout
Author image

Creating an interactive archives section for your website can enhance user experience by organizing content and making it easily accessible. In this guide, we'll walk through the steps to implement an archives section with expand/collapse functionality using PHP, MySQL, and Bootstrap. Step 1: Set Up Your Database and Connection First, ensure ...

Read More
Test the video layout design(Upload and Store video to MySQL Database with PHP) image
Test the video layout design(Upload and Store video to MySQL Database with PHP)
Author image

By storing a file in the MySQL database make it easier to retrieve files uploaded by the user or in a specific category.For this require storing the file on the server and saving the reference to the database. In the tutorial, I show how you can upload and store video to the MySQL database table with PHP. Also, show how you can display stored video...

Read More
How to set the expiry period for a reset password link. image
How to set the expiry period for a reset password link.
Author image

You may be wondering how to implement or set a password link expiry time after requesting a reset password. So we can implement using PHP and Backend MySql. We will divide the content in to three sections. 1, create an input text box a user entered their email <form class="login-form" id="vform" action="" method="post"> ...

Read More
Getting User Device Location and Updating Database image
Getting User Device Location and Updating Database
Author image

In modern web applications, user location data can be a valuable asset for various functionalities, including personalization, localization, and tracking user activities. Integrating user device location into your web application allows you to enhance user experiences and provide tailored content or services based on their geographical location....

Read More
Send A verification email when a new user registered  image
Send A verification email when a new user registered
Author image

When a new user  registered for the first time the account must verified. It can be done in different ways.  // REGISTER USER if (isset($_POST['register_btn'])) { // receive all input values from the form $firstname = esc($_POST['firstname']); $lastname = esc($_POST['lastname']); $genders=esc($_POST["gender"]); $username = esc($_POST['...

Read More
How to Send Verification link when a new user register image
How to Send Verification link when a new user register
Author image

<p>We are going to build a nice PHP sign-up script where a user can create an account to gain access to the&nbsp;&quot;members only section&quot; of a website.</p> <p>After the user creates their account, the account will then be locked until the user clicks a verification link that they&#39;ll receive in their email inbox.</p> <pre> <code c...

Read More
How to limit the number of login attempts  image
How to limit the number of login attempts
Author image

Let's create a login form page a user can login. &lt;form class="modal-contentloginform" id="table" method="post" action="&lt;?php echo BASE_URL . 'login.php'; ?&gt;" onSubmit = "return validate()"&gt; &lt;div class="header_login"&gt; &lt;?php include(ROOT_PATH . '/includes/errors.php'); ?&gt; &lt;?php include(ROOT_PATH . ...

Read More
How to limit the number of login attempt using PHP part 2(PHP functionality) image
How to limit the number of login attempt using PHP part 2(PHP functionality)
Author image

In previous post we design the login form, so finally  implement PHP code // LOG USER IN if (isset($_POST['login_btn'])) { $email = esc($_POST['email']); $password = esc($_POST['password']); $time=time()-60; $ip_address=getIpAddr(); $check_login_result= "SELECT count(*) as total_count from login_log WHERE try_time&g...

Read More
Download file using PHP image
Download file using PHP
Author image

Upload and save a file in to a database  using PHP and MySQL. let's implement upload a file. create an upload form input file type &lt;form method="post" action="" enctype="multipart/form-data"&gt; &lt;input type="file" name="File" id="File"&gt; &lt;button type="submit" class="btn" name="btn-upload">Upload</i>&lt;/button&gt; &lt;/form&g...

Read More
Inactive user enforce to login (SESSION expired) or Limmit the resource image
Inactive user enforce to login (SESSION expired) or Limmit the resource
Author image

First when a user logged in put the logged in user in to a session $sql = "SELECT * FROM users WHERE (email='$email' OR username='$email') AND password='$password' LIMIT 1"; $result = mysqli_query($conn, $sql); if (mysqli_num_rows($result) > 0) { $row = mysqli_fetch_assoc($result); // get id of created user ...

Read More
How to count page viewers based on the IP Address of the device image
How to count page viewers based on the IP Address of the device
Author image

How to Add a Visitor Counter to a Website using PHP and MySQL  When a user visit a website and access the the content based on the IP address of the device and it will count the visitors. First create a table in MySQL database as shown in the picture below Then write a PHP code to count the visitor  /*visitor counter*/ function...

Read More
Pagination in PHP image
Pagination in PHP
Author image

<p>PHP&nbsp;</p>

Read More

Search


Archives

Find Us on Facebook

Subscribe for new updates



Back to Top