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";
|
||||
|
||||
// Prepare a select statement
|
||||
$sql = "SELECT * FROM employees WHERE id = ?";
|
||||
$sql = "SELECT * FROM vokabeln WHERE id = ?";
|
||||
|
||||
if($stmt = mysqli_prepare($link, $sql)){
|
||||
// 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);
|
||||
|
||||
// Retrieve individual field value
|
||||
$name = $row["name"];
|
||||
$address = $row["address"];
|
||||
$salary = $row["salary"];
|
||||
} else{
|
||||
// URL doesn't contain valid id parameter. Redirect to error page
|
||||
// $vokabel = $row["vokabel"];
|
||||
// $stammform = $row["stammform"];
|
||||
// $art = $row["art"];
|
||||
// $flexion = $row["flexion"];
|
||||
// $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");
|
||||
exit();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user