Articles on PHP Category


Getting User Device Location and Updating Database image

Getting User Device Location and Updating Database

Author image
By JOHN Mon, Feb 19, 2024 at 12:31 PM (3 months ago)
Updated On Sat, Mar 09, 2024 at 07:59 AM (2 months ago)

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...

Read More … 
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
By JOHN Thu, Nov 17, 2022 at 08:00 AM (2 years ago)
Updated On Thu, Jan 05, 2023 at 06:24 PM (one year ago)

coming soon. for updates



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 JOHN Sat, Nov 05, 2022 at 05:15 PM (2 years ago)
Updated On Wed, Nov 09, 2022 at 06:39 PM (2 years ago)

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...

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
By JOHN Mon, Oct 10, 2022 at 05:31 AM (2 years ago)
Updated On Tue, Nov 08, 2022 at 07:53 PM (2 years ago)

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="...        

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

Send A verification email when a new user registered

Author image
By JOHN Tue, Dec 07, 2021 at 04:53 PM (2 years ago)
Updated On Tue, Nov 08, 2022 at 06:58 AM (2 years ago)

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']);
...        

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
By JOHN Fri, Oct 15, 2021 at 07:49 AM (3 years ago)
Updated On Fri, Nov 04, 2022 at 05:00 PM (2 years ago)

We are going to build a nice PHP sign-up script where a user can create an account to gain access to the "members only section" of a website.

After the user creates their account, the account will then be locked until the user clicks a verification link that they'll receive in their email inbox.



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

How to limit the number of login attempts

Author image
By JOHN Sat, Oct 31, 2020 at 10:19 PM (4 years ago)
Updated On Wed, Nov 09, 2022 at 04:38 PM (2 years ago)

Let's create a login form page a user can login.

<form  class="modal-contentloginform" id="table" method="post" action="<?php echo BASE_URL . 'login.php'; ?>"  onSubmit = "return validate()">         
	 <div class="header_login">
	 <?php include(ROOT_PATH . '/incl...        

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
By JOHN Tue, Sep 22, 2020 at 06:47 PM (4 years ago)
Updated On Wed, Nov 09, 2022 at 05:06 PM (2 years ago)

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= "SELEC...        

Read More … 
Download file using PHP image

Download file using PHP

Author image
By MEWDED Wed, Sep 02, 2020 at 10:04 AM (4 years ago)
Updated On Sat, Nov 12, 2022 at 09:10 AM (2 years ago)

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

<form method="post" action="" enctype="multipart/form-data">
<input type="file" name="File" id="File">
<button type="submit" cla...        

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
By MEWDED Tue, Sep 01, 2020 at 04:24 AM (4 years ago)
Updated On Sat, Nov 12, 2022 at 09:35 AM (2 years ago)

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 = mysql...        

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
By MEWDED Thu, Aug 27, 2020 at 04:37 PM (4 years ago)
Updated On Sat, Nov 12, 2022 at 06:57 PM (2 years ago)

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...

Read More … 
Pagination in PHP image

Pagination in PHP

Author image
By MEWDED Fri, Aug 14, 2020 at 02:58 PM (4 years ago)
Updated On Fri, Nov 04, 2022 at 03:08 PM (2 years ago)

PHP 



Read More … 
Author Title image

Author Title

Author image
By JOHN Mon, Jul 13, 2020 at 04:19 AM (4 years ago)
Updated On Fri, Nov 04, 2022 at 03:08 PM (2 years ago)

body of the statement



Read More … 

Search


Archives

No archives data found yet in 2025.

No archives data found in 2016.

Find Us on Facebook

Subscribe for new updates




Back to Top