Skip to content

Instantly share code, notes, and snippets.

View arif98741's full-sized avatar
🏠
Actively Working

Ariful Islam arif98741

🏠
Actively Working
View GitHub Profile
@arif98741
arif98741 / Data.php
Last active March 9, 2018 09:03
JSON Data Retrive
<?php
$con = new mysqli("localhost","root","","database");
$result = array();
if($con)
{
$stmt = $con->query("select * from android_data");
//$stmt = $con->query("select * from tbl_invoice_products");
if($stmt)
@arif98741
arif98741 / get_data.php
Last active March 9, 2018 09:27
Get Data From Server as Json Response
<?php
require "conn.php";
if(isset($_POST["username"])) //always use isset function to skip unwanted request and error
{
$query = mysqli_query($conn, "select * from android_data where username='$user_name'");
if ($query) {
while ($row = mysqli_fetch_array($query)) {
@arif98741
arif98741 / MySQli GetName.php
Last active March 26, 2018 16:48
MySQLi Issue
<?php
$con = new mysqli("localhost", "root", "password", "database");
if($con)
{
$username = "use124";
$password = "pass123";
$sql = "select * from userdata where username ='$username' and password = '$password'";
$stmt = $con->query($sql);
@arif98741
arif98741 / databyid.php
Created March 26, 2018 17:03
Get Data by id
<?php
$con = new mysqli("localhost", "root", "password", "database");
if($con)
{
$id = "123";
$sql = "select * from table where id='$id'";
$stmt = $con->query($sql);
I use the first
—– BEGIN LICENSE —–
Michael Barnes
Single User License
EA7E-821385
8A353C41 872A0D5C DF9B2950 AFF6F667
C458EA6D 8EA3C286 98D1D650 131A97AB
AA919AEC EF20E143 B361B1E7 4C8B7F04
@arif98741
arif98741 / Email Existence and Registration.php
Last active June 10, 2018 00:22
Check wheather Email is Exist and Registration
<?php
/*
@ filter email
@ check email
@return json response
developer: Ariful Islam
website: phpdark.com
email: [email protected]
github.com/arif98741
expert in php,laravel,codeigniter,node,angular
@arif98741
arif98741 / UserExist.php
Last active June 18, 2018 11:05
Login Registration User Existance
<?php
//phpdark.com
//[email protected]
if (isset($_POST['login'])) {
$con = new mysqli("localhost","root","","database"); //database connection
if ($con) {
$username = mysqli_real_escape_string($con, $_POST['$username']);
$password = mysqli_real_escape_string($con, $_POST['$password']);
$hashed_password = password_hash($password, PASSWORD_DEFAULT);
@arif98741
arif98741 / UserController.php
Last active July 5, 2018 15:03
Laraval User Existance Check
<?php
namespace App\Http\Controllers;
use Illuminate\Support\Facades\DB; //must need to add during work with database
use App\Http\Controllers\Controller;
class UserController extends Controller
{
@arif98741
arif98741 / oop.php
Created July 21, 2018 11:10
OOP.PHP Example
<?php
$path = realpath(dirname(__DIR__));
include_once 'DB.php';
include_once 'Session.php';
include_once $path . '/helper/Helper.php';
class Invoice {
private $dbObj;
@arif98741
arif98741 / return.php
Last active August 19, 2018 03:11
Return Statement
<?php
class Me_Class{
public function content()
{
global $conn;
$this->sql = "select * from question";
$result = $con->query($this->sql);
$question = array();
while ($rows = $result->fetch_array()) {