Skip to content

Instantly share code, notes, and snippets.

View IbraheemSalem's full-sized avatar

Ibarheem Salem IbraheemSalem

View GitHub Profile
<?php
include('connect.php');
if(isset($_POST['search'])){
$key = $_POST['search'];
$stmt = $con->prepare("select * from users where username like '%$key%' or phone_no like '%$key%'");
$stmt->execute();
$user_details = $stmt->fetch(PDO::FETCH_ASSOC);
if($stmt->rowCount()>0)
{
$output['success'] = '<table class="table table-bordered">
<?php
include('connect.php');
//insert data into database
if(isset($_POST['save'])){
$name=$_POST['name'];
$age=$_POST['age'];
$target="images/".basename($_FILES['image']['name']);
$sql="INSERT INTO image(name,age,image)VALUES('$name','$age','$target')";
$stmt=$con->prepare($sql);
$stmt->execute();
FFD8FF=JPEG(jpg)
89504E47=PNG(png)
47494638=GIF(gif)
49492A00=TIFF(tif)
424D=Windows\ Bitmap(bmp)
41433130=CAD(dwg)
38425053=Adobe\ Photoshop(psd)
7B5C727466=Rich\ Text\ Format(rtf)
3C3F786D6C=XML(xml)
68746D6C3E=HTML(html)