Esempio n. 1
0
<?php

require_once "edit_functions.php";
if (isset($_POST["update_plate"])) {
    //vajutas salvesta nuppu
    //numberplate ja color tulevad vormist, aga id varjatud väljas
    updateCar($_POST["id"], $_POST["number_plate"], $_POST["color"]);
}
//edit.php
//aadressireal on ?edit_id siis trükin välja selle väärtuse
if (isset($_GET["edit_id"])) {
    echo $_GET["edit_id"];
    //id oli aadressireal
    //tahaks ühte rida kõige uuemaid andmeid kus id on $_GET["edit_id"]
    $car = getEditData($_GET["edit_id"]);
    var_dump($car);
} else {
    //ei olnud aadressireal
    echo "Viga";
    //die - edasi lehte ei laeta
    //die();
    //suuname kasutaja table.php lehele
    header("Location: table.php");
}
?>

<h2>Muuda autonumbrimärkki</h2>
<form action="<?php 
echo htmlspecialchars($_SERVER["PHP_SELF"]);
?>
" method="post">
Esempio n. 2
0
<?php

require_once "edit_functions.php";
$grade = "";
$mistakes = "";
$mistakes_error = "";
if (isset($_POST["update_review"])) {
    updateReview($_POST["id"], $_POST["exam"], $_POST["grade"], $_POST["mistakes"]);
}
if (isset($_GET["edit_id"])) {
    echo $_GET["edit_id"];
    $review = getEditData($_GET["edit_id"]);
    var_dump($review);
} else {
    echo "edit_id is not set";
    header("Location:data.php");
}
Esempio n. 3
0
<?php

require_once "edit_functions.php";
//edit.php
//aadressireal on ?edit_id siis trukin valja selle vaartuse
if (isset($_GET["edit_id"])) {
    echo $_GET["edit_id"];
    //id oli adressireal
    //tahaks uhte rida koige uuemaid andmeid kus id on $_GET["edit.php"]
    $Note1 = getEditData($_GET["edit_id"]);
    var_dump($Note1);
} else {
    //ei olnud adressireal
    echo "Viga";
    //die - edasi lehte ei laeta
    //die();
    //suuname kasutaja table.php lehele
    header("Location: table.php");
}
if (isset($_POST["update_note"])) {
    //vajutas salvesta nuppu
    //number_plate ja color tulevad vormist
    //aga id aadresirealt
    updateNote($_POST["id"], $_POST["title"], $_POST["note"]);
}
?>

<h2>Muuda märkuse</h2>
<form action="<?php 
echo htmlspecialchars($_SERVER["PHP_SELF"]);
?>
Esempio n. 4
0
<?php 
require_once "edit_functions.php";
if (isset($_POST["update_post"])) {
    // vajutas salvesta nuppu
    // numberplate ja color tulevad vormist
    // aga id varjatud väljast
    updateDream($_POST["id"], $_POST["blog_post"]);
}
if (isset($_GET["edit_id"])) {
    echo $_GET["edit_id"];
    //id oli aadressireal
    $dream = getEditData($_GET["edit_id"]);
    var_dump($blog);
} else {
    echo "VIGA";
    //die - edasi lehte ei laeta
    //die();
    //suuname kasutaja table.php öeheöe
    header("Location: table.php");
}
?>

<h2>Muuda unenägu</h2>
<form action="<?php 
echo htmlspecialchars($_SERVER["PHP_SELF"]);
?>
" method="post" >
	<label type="hidden" name="id" value="<?php 
echo $_GET["edit_id"];
?>
">
Esempio n. 5
0
<?php

require_once "functions.php";
if (isset($_POST["update_plate"])) {
    // vajutas salvesta nuppu
    // numberplate ja color tulevad vormist
    // aga id varjatud väljast
    update_data($_POST["id"], $_POST["name"], $_POST["voit"], $_POST["kaotus"], $_POST["vslamm"], $_POST["ssamm"], $_POST["ristit"]);
}
if (isset($_GET["edit_id"])) {
    //echo $_GET["edit_id"];
    // id oli aadressireal
    // tahaks ühte rida kõige uuemaid andmeid kus id on $_GET["edit_id"]
    $data = getEditData($_GET["edit_id"]);
    //var_dump($data);
} else {
    // ei olnud aadressireal
    echo "VIGA";
    // die - edasi lehte ei laeta
    //die();
    header("Location: redigeeri.php");
}
?>
</table>
<h2>Muuda Andmeid</h2>
<form action="<?php 
echo htmlspecialchars($_SERVER["PHP_SELF"]);
?>
" method="post" >
	<input type="hidden" name="id" value="<?php 
echo $_GET["edit_id"];
<?php

require_once "functions.php";
if (isset($_POST["update_post"])) {
    //vajutas salvesta nuppu
    //numberplate ja color tulevad vormist, aga id varjatud väljas
    updatePost($_POST["id"], $_POST["tweet"]);
}
//edit.php
//aadressireal on ?edit_id siis trükin välja selle väärtuse
if (isset($_GET["edit_id"])) {
    echo $_GET["edit_id"];
    //id oli aadressireal
    //tahaks ühte rida kõige uuemaid andmeid kus id on $_GET["edit_id"]
    $post = getEditData($_GET["edit_id"]);
    var_dump($post);
} else {
    //ei olnud aadressireal
    echo "Viga";
    //die - edasi lehte ei laeta
    //die();
    //suuname kasutaja table.php lehele
    header("Location: table.php");
}
?>

<h2>Muuda postitusi</h2>
<form action="<?php 
echo htmlspecialchars($_SERVER["PHP_SELF"]);
?>
" method="post">
Esempio n. 7
0
<?php

require_once "edit_functions.php";
if (isset($_POST["update_review"])) {
    updateboot($_POST["id"], $_POST["boot_brand"], $_POST["model"]);
}
if (isset($_GET["edit_id"])) {
    echo $_GET["edit_id"];
    $footyboots = getEditData($_GET["edit_id"]);
    var_dump($footyboots);
} else {
    //ei olnud aadressireal
    echo "VIGA";
    header("Location:table.php");
}
?>

<h2>Change Boot</h2>
  <form action="<?php 
echo htmlspecialchars($_SERVER["PHP_SELF"]);
?>
" method="post" >
	<input type="hidden" name="id" value="<?php 
echo $_GET["edit_id"];
?>
" > 
  	<label for="boot_brand" >Boot brand</label><br>
	<input id="boot_brand" name="boot_brand" type="text" value="<?php 
echo $footyboots->boot_brand;
?>
" ><br><br>
Esempio n. 8
0
<?php

require_once "edit_functions.php";
if (isset($_POST["update_plate"])) {
    updateContent($_POST["id"], $_POST["title"], $_POST["media"]);
}
//edit.php
// aadressireal on ?edit_id siis trükin välja selle väärtuse
if (isset($_GET["edit_id"])) {
    echo $_GET["edit_id"];
    // id oli aadressireal
    // tahaks ühte rida kõige uuemaid andmeid kus id on $_GET["edit_id"]
    $content = getEditData($_GET["edit_id"]);
    var_dump($car);
} else {
    // ei olnud aadressireal
    echo "VIGA";
    // die - edasi lehte ei laeta
    //die();
    //suuname kasutaja table.php lehele
    header("Location: table.php");
}
?>

<h2>Muuda postitust</h2>
<form action="<?php 
echo htmlspecialchars($_SERVER["PHP_SELF"]);
?>
" method="post" >
	<input type="hidden" name="id" value="<?php 
echo $_GET["edit_id"];
Esempio n. 9
0
<?php

require_once "functions.php";
if (!isset($_SESSION["logged_in_user_id"])) {
    header("Location: login.php");
}
if (isset($_POST["update_armor"])) {
    updateArmor($_POST["id"], $_POST["armor_type"], $_POST["armor_race"], $_POST["armor_color"]);
}
if (isset($_GET["edit_id"])) {
    echo $_GET["edit_id"];
    $armor = getEditData($_GET["edit_id"]);
} else {
    echo "Viga";
    header("Location: table.php");
}
?>

<h2>Muuda armori soovitust.</h2>
<form action="<?php 
echo htmlspecialchars($_SERVER["PHP_SELF"]);
?>
" method="post" >
	<input type="hidden" name="id" value="<?php 
echo $_GET["edit_id"];
?>
">
	<label for="armor_type">Armori tüüp</label><br>
	<input id="armor_type" name="armor_type" type="text" value="<?php 
echo $armor->type;
?>
Esempio n. 10
0
<?php

require_once "edit_functions.php";
if (isset($_POST["update_place"])) {
    updatePlace($_POST["id"], $_POST["location"], $_POST["condition"], $_POST["description"], $_POST["date_visited"]);
}
//aadressrireal on ?edit_id siis trükin välja selle väärtuse
if (isset($_GET["edit_id"])) {
    echo $_GET["edit_id"];
    //id oli aadressireal
    //tahaks ühte rida kõige uuemaid andmeid kus id on $_GET["edit_id"]
    $place = getEditData($_GET["edit_id"]);
    var_dump($place);
} else {
    //ei olnud aadressireal
    echo "Viga";
    //die - edasi lehte ei laeta
    //die();
    //header("Location:table.php");
}
?>

<h2>Muuda kirjeid</h2>
<form action="<?php 
echo htmlspecialchars($_SERVER["PHP_SELF"]);
?>
" method="post">
	<label for="location">Asukoht</label><br>
	<input id="location" name="location" type="text"  value="<?php 
echo $location;
?>
Esempio n. 11
0
<?php

require_once "edit_functions.php";
//edit.php
//aadressireal on ?edit_id siis trukin valja selle vaartuse
if (isset($_GET["edit_id"])) {
    echo $_GET["edit_id"];
    //id oli adressireal
    //tahaks uhte rida koige uuemaid andmeid kus id on $_GET["edit.php"]
    $Data1 = getEditData($_GET["edit_id"]);
    var_dump($Data1);
} else {
    //ei olnud adressireal
    echo "Viga";
    //die - edasi lehte ei laeta
    //die();
    //suuname kasutaja table.php lehele
    header("Location: register.php");
}
if (isset($_POST["update_data"])) {
    //vajutas salvesta nuppu
    //number_plate ja color tulevad vormist
    //aga id aadresirealt
    updateData($_POST["register_id"], $_POST["name"], $_POST["address"], $_POST["phone_number"], $_POST["register_code"]);
}
?>

<h2>Muuda andmed</h2>
<form action="<?php 
echo htmlspecialchars($_SERVER["PHP_SELF"]);
?>