Skip to content

Instantly share code, notes, and snippets.

View sarkarripon's full-sized avatar
🏠
Working from home

sarkarripon

🏠
Working from home
View GitHub Profile
@sarkarripon
sarkarripon / PHP Database connection
Created November 30, 2022 08:55
database connection in php
<?php
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "todo_db";
// Create connection
$conn = new mysqli($servername, $username, $password , $dbname);
// Check connection
@sarkarripon
sarkarripon / File upload
Last active November 30, 2022 08:54
upload image using php and inserting to mysql
================================html code=================================
<?php include 'header.php'?>
<!--
enctype = helps to extract file metadata
name="fileToUpload" = it is a array name which will hold image metadata
-->
<form action="upload.php" method="post" enctype="multipart/form-data">
Select image to upload:
<input type="file" name="fileToUpload" id="fileToUpload">
================================html code=================================
<?php include 'header.php'?>
<!--
enctype = helps to extract file metadata
name="fileToUpload" = it is a array name which will hold image metadata
-->

Keybase proof

I hereby claim:

  • I am sarkarripon on github.
  • I am sarkarripon (https://keybase.io/sarkarripon) on keybase.
  • I have a public key ASBXtfd-jPZoZw8hyNkKK9fhEFcJYJxDAGYUq31_dxaFHwo

To claim this, I am signing this object: