Skip to content

Instantly share code, notes, and snippets.

<?php
function u($string="") {
return urlencode($string);
}
function raw_u($string="") {
return rawurlencode($string);
}
function h($string="") {
@edoves
edoves / Readme1.md
Last active September 3, 2024 11:46
PDO Class Object

Signup and SignIn and Signout

class Database
{
    private $host = "localhost";
    private $db_name = "mydb";
    private $username = "root";
    private $password = "";
    public $conn;
// Jquery Version
$(function () {
$.getJSON('api', updateFeedback);
$('.feedback-form').submit(function (e) {
e.preventDefault();
$.post('api', {
name: $('#feedback-form-name').val(),
title: $('#feedback-form-title').val(),
message: $('#feedback-form-message').val()
@edoves
edoves / git.bash
Last active December 7, 2019 12:36
# From Kal Skills Teaching procces on cloning a existing repository or want to colaborate with it
git clone - clone a repository
cd - change directory
ls - list directory
git status - mostly for verification
git add filename
git commit -m "waht ever message here"
git push
upstream
@edoves
edoves / Relational_Database.sql
Last active September 4, 2022 02:35
mysqlcommand, mysqlconnect php, mysqliconnectOOP version php
-- 02 JOIN
-- test.db
-- join example tables, left and right
CREATE TABLE left ( id INTEGER, description TEXT );
CREATE TABLE right ( id INTEGER, description TEXT );
INSERT INTO left VALUES ( 1, 'left 01' );
INSERT INTO left VALUES ( 2, 'left 02' );
INSERT INTO left VALUES ( 3, 'left 03' );