28 Mart 2015 Cumartesi

Css ile modal yapımı

HTML
    <a href="#modal">Aç</a>

    <div class="modal" id="modal">
        Ben Bir Garip Modal window örneğiyim
    </div>


24 Mart 2015 Salı

Jquery Serialize ile get

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
</head>
<body>
    <form action="" method="get">
        <input type="text" name="adi" id="">
        <input type="text" name="soyadi" id="">
        <input type="text" name="sifre" id="">
        <input type="button" value="Gönder" class="gonder">
    </form>

23 Mart 2015 Pazartesi

Php ile Upload

<?php

if (isset($_FILES['file'])) {
    $boyut = $_FILES['file']['size'];
    $tip   = $_FILES['file']['type']; //---image/jpeg
    $adi   = $_FILES['file']['name'];
    $dosya = $_FILES['file']['tmp_name']; //--yüklenen dosya yolu

Dinamik Sitemap PHP

<?php
function seo_url($data) {
$sefurl = str_replace('A','a',$data);
$sefurl = str_replace('B','b',$sefurl);
$sefurl = str_replace('C','c',$sefurl);

21 Mart 2015 Cumartesi

PDO

VERİ TABANI BAĞLANMA

<?php
   
    try{

        $pdo = new PDO("mysql: host=localhost;dbname=kayit","root","");

    }catch(PDOExeption $e){
        echo $e->getMessage();
    }

    /*hata gösterme*/

    if ($pdo->query("select * from uyeler order by")) {
        //
    }else{
        $hata =  $pdo->errorInfo();
        echo $hata[2];
    }

?>