doit
This commit is contained in:
1 parent
b78ea2aa98
commit
0ae084f80a
1 file changed
+9
-6
@@ -5,7 +5,7 @@ if(isset($_GET["id"]) && !empty(trim($_GET["id"]))){
|
|||||||
require_once "config.php";
|
require_once "config.php";
|
||||||
|
|
||||||
// Prepare a select statement
|
// Prepare a select statement
|
||||||
$sql = "SELECT * FROM employees WHERE id = ?";
|
$sql = "SELECT * FROM vokabeln WHERE id = ?";
|
||||||
|
|
||||||
if($stmt = mysqli_prepare($link, $sql)){
|
if($stmt = mysqli_prepare($link, $sql)){
|
||||||
// Bind variables to the prepared statement as parameters
|
// Bind variables to the prepared statement as parameters
|
||||||
@@ -24,11 +24,14 @@ if(isset($_GET["id"]) && !empty(trim($_GET["id"]))){
|
|||||||
$row = mysqli_fetch_array($result, MYSQLI_ASSOC);
|
$row = mysqli_fetch_array($result, MYSQLI_ASSOC);
|
||||||
|
|
||||||
// Retrieve individual field value
|
// Retrieve individual field value
|
||||||
$name = $row["name"];
|
// $vokabel = $row["vokabel"];
|
||||||
$address = $row["address"];
|
// $stammform = $row["stammform"];
|
||||||
$salary = $row["salary"];
|
// $art = $row["art"];
|
||||||
} else{
|
// $flexion = $row["flexion"];
|
||||||
// URL doesn't contain valid id parameter. Redirect to error page
|
// $uebersetzung = $row["uebersetzung"];
|
||||||
|
// $lektion = $row["lektion"];
|
||||||
|
// $kommentar = $row["kommentar"];
|
||||||
|
} else { // URL doesn't contain valid id parameter. Redirect to error page
|
||||||
header("location: error.php");
|
header("location: error.php");
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user