Calendar Year: September, 2020 Archives List


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

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 PHP

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 PHP

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 … 

Search


Find Us on Facebook

Subscribe for new Updates




Back to Top