NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

<!DOCTYPE html>
<html lang="tr" class="no-inlinesvg sayfa-index">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Ömer Ege Denemeler</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Ömer Ege Denemeler" />
<meta name="keywords" content="Ömer Ege Denemeler" />
<meta name="news_keywords" content="Ömer Ege Denemeler" />
<meta name="robots" content="noodp"/>
<meta name="author" content="" />
<meta name="theme-color" content="#ea4c89"><meta property="og:type" content="website" />
<?php
$conn = mysqli_connect("localhost","omerge_denemeler", "asd1asd1asd1","omerge_denemeler");
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
if(!empty($_POST) && empty($_GET))
{
$adi=$_POST['adi'];
$soyadi=$_POST['soyadi'];
$not=$_POST['not'];
$id=$_POST['id'];

$sql = "INSERT INTO `ogrenci`(`adi`, `soyadi`, `not`) VALUES ('$adi','$soyadi','$not')";
if ($conn->query($sql) === TRUE) {
echo "bilgiler kaydedildi";
} else {
echo "Error updating record: " . $conn->error;
}

}
?>
<a href="?sayfa=goster">Tüm notları göster. </a>
<form action="#" method="post">
<input type="text" name="adi" placeholder="İsminizi Girin">
<input type="text" name="soyadi" placeholder="soy isminiz">
<input type="text" name="not" placeholder="notunuz">
<input type="submit" value="Gönder">
</form>
<?php
if($_GET['sayfa']=="duzenle")
{
// Seçiyoruz.
$idd=$_GET['id'];
$sql = "SELECT `adi`, `soyadi`, `not` FROM `ogrenci` WHERE id='$idd'";
$result = $conn->query($sql);
$row = $result->fetch_assoc();

echo '
<br>
<form action="#duzenle" method="POST">
<input type="text" name="adid" placeholder="İsim" value="'.$row['adi'].'">
<input type="text" name="soyadid" placeholder="Soyİsim" value="'.$row['soyadi'].'">
<input type="text" name="notd" placeholder="NOT" value="'.$row['not'].'">
<input type="submit" value="Düzenle">
</form>
';

if(!empty($_POST))
{

$adid=$_POST['adid'];
$soyadid=$_POST['soyadid'];
$notd=$_POST['notd'];


$sql = "UPDATE `ogrenci` SET `adi` = '$adid', `soyadi` = '$soyadid', `not` = '$notd' WHERE `ogrenci`.`id` = $idd";

if ($conn->query($sql) === TRUE) {
echo "Record updated successfully";
} else {
echo "Error updating record: " . $conn->error;
}

}


}
if($_GET['sayfa']=="goster")
{


$sql = "SELECT `adi`, `soyadi`, `not`, `id` FROM `ogrenci`";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
// output data of each row
while($row = $result->fetch_assoc()) {
echo "not: " . $row["not"]. " - isim: " . $row["adi"]. " " . $row["soyadi"]. " -- <a href='?sayfa=sil&id=" . $row["id"]. "'>Sil</a>---<a href='?sayfa=duzenle&id=" . $row["id"]. "'>Düzenle</a><br>";
}
} else {
echo "0 results";
}

}
if($_GET['sayfa']=="sil")
{
$id=$_GET['id'];
$sql = "DELETE FROM `ogrenci` WHERE id='$id'";
if ($conn->query($sql) === TRUE) {
echo "Record deleted successfully";
} else {
echo "Error deleting record: " . $conn->error;
}
$conn->close();
}

?>

...........................................................

-- phpMyAdmin SQL Dump
-- version 4.7.7
-- https://www.phpmyadmin.net/
--
-- Anamakine: localhost:3306
-- Üretim Zamanı: 06 May 2018, 16:32:15
-- Sunucu sürümü: 5.6.38
-- PHP Sürümü: 5.6.30

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Veritabanı: `omerge_denemeler`
--

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `ogrenci`
--

CREATE TABLE `ogrenci` (
`adi` varchar(100) NOT NULL,
`soyadi` varchar(100) NOT NULL,
`not` int(11) NOT NULL,
`id` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Tablo döküm verisi `ogrenci`
--

INSERT INTO `ogrenci` (`adi`, `soyadi`, `not`, `id`) VALUES
('adem2', 'dutucu2', 99, 57);

--
-- Dökümü yapılmış tablolar için indeksler
--

--
-- Tablo için indeksler `ogrenci`
--
ALTER TABLE `ogrenci`
ADD PRIMARY KEY (`id`);

--
-- Dökümü yapılmış tablolar için AUTO_INCREMENT değeri
--

--
-- Tablo için AUTO_INCREMENT değeri `ogrenci`
--
ALTER TABLE `ogrenci`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=58;
COMMIT;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.