1.8K Views
Articles on PHP Category
Updated On Fri, Aug 02, 2024 (4 months ago)
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 ...
Updated On Wed, Nov 09, 2022 (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 display stored video...
Updated On Tue, Nov 08, 2022 (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="login-form" id="vform" action="" method="post"> ...
Updated On Sat, Mar 09, 2024 (9 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 their geographical location....
Updated On Tue, Nov 08, 2022 (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']); $genders=esc($_POST["gender"]); $username = esc($_POST['...
Updated On Fri, Nov 04, 2022 (2 years ago)
<p>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.</p> <p>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.</p> <pre> <code c...
Updated On Wed, Nov 09, 2022 (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 . '/includes/errors.php'); ?> <?php include(ROOT_PATH . ...
Updated On Wed, Nov 09, 2022 (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= "SELECT count(*) as total_count from login_log WHERE try_time&g...
Updated On Sat, Nov 12, 2022 (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" class="btn" name="btn-upload">Upload</i></button> </form&g...
Updated On Sat, Nov 12, 2022 (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 = mysqli_fetch_assoc($result); // get id of created user ...
Updated On Sat, Nov 12, 2022 (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 picture below Then write a PHP code to count the visitor /*visitor counter*/ function...
Updated On Fri, Nov 04, 2022 (2 years ago)
<p>PHP </p>