Skip to content

Instantly share code, notes, and snippets.

View Mauryashubham's full-sized avatar

Shubham Maurya Mauryashubham

View GitHub Profile
@Mauryashubham
Mauryashubham / class.User.php
Created September 8, 2017 06:13
Simple login and registration process using PHP
<?php
/**
*
*/
class USER
{
private $db;
//Constructor
@Mauryashubham
Mauryashubham / index.php
Created September 7, 2017 11:42
Validate a Form using Simple JavaScript and PHP
/**
@author : Shubham Maurya,
Email id : maurya.shubham5@gmail.com
**/
Hi all , Welcome to shubhammaurya.com , Today we are going to discuss ,
How to validate a form using JavaScript
So, To start first make a file in notepad and save it as index.php and paste the below code.
@Mauryashubham
Mauryashubham / index.html
Last active September 4, 2017 07:20
Validate a Form using Simple JavaScript
/**
@author : Shubham Maurya,
Email id : maurya.shubham5@gmail.com
**/
Hi all , Welcome to shubhammaurya.com , Today we are going to discuss ,
How to validate a form using JavaScript
So, To start first make a file in notepad and save it as index.html and paste the below code.
@Mauryashubham
Mauryashubham / index.php
Created August 29, 2017 10:58
Using reCAPTCHA with PHP
/**
@author : Shubham Maurya,
Email id : maurya.shubham5@gmail.com
**/
Hi all , Welcome to shubhammaurya.com , Today we are going to discuss ,
How to Use google recaptcha in form using PHP
LET START
@Mauryashubham
Mauryashubham / class.User.php
Last active August 24, 2017 11:45
Send Verification link on email after registration in PHP
<?php
/**
@author : Shubham Maurya,
Email id : maurya.shubham5@gmail.com
**/
make a file in notepad and save it as class.User.php and paste the below code.
<?php
@Mauryashubham
Mauryashubham / a.txt
Created August 23, 2017 07:49
HTML select required Attribute
/**
@author : Shubham Maurya,
Email id : maurya.shubham5@gmail.com
**/
Hi all , Welcome to shubhammaurya.com , Today we are going to discuss ,
How to Make Select tag required by using two methods.
1.By Simple method i.e required tag.
2.By using javascript.
@Mauryashubham
Mauryashubham / Database
Created August 19, 2017 11:04
Count Page views using PHP Mysql
-- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 19, 2017 at 01:01 PM
-- Server version: 10.1.21-MariaDB
-- PHP Version: 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
@Mauryashubham
Mauryashubham / index.php
Created August 19, 2017 09:25
Connect PHP to MSSQL database
/**
@author : Shubham Maurya,
Email id : maurya.shubham5@gmail.com
**/
Hi all , Welcome to shubhammaurya.com , Today we are going to discuss ,
How to Call Connect PHP to MSSQL database
1.Make a file in notepad and save it as dbconfig.php and paste the below code.
@Mauryashubham
Mauryashubham / index.php
Created August 12, 2017 11:03
Multiple Image Upload PHP form
/**
@author : Shubham Maurya,
Email id : maurya.shubham5@gmail.com
**/
1.Make a file in notepad and save it as index.php and paste the below code.
<?php
$DB_host = "localhost";
@Mauryashubham
Mauryashubham / home.php
Last active August 10, 2017 07:29
Count Online Users Using PHP
1.Make a file in notepad and save it as home.php and paste the below code.
<?php
//connect to mysql database
$con = mysqli_connect("localhost", "root", "", "test") or die("Error " . mysqli_error($con));
$fetch="SELECT COUNT(*) FROM login WHERE LastTimeSeen > DATE_SUB(NOW(), INTERVAL 5 MINUTE)";
$fet=mysqli_query($con, $fetch);
$online_row = mysqli_fetch_row($fet);