Add: update maestro info, password php
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
header("Content-Type: application/json");
|
||||
|
||||
include "./../lib/send_reply_json.php";
|
||||
include "./../setup/connect_db.php";
|
||||
|
||||
$maestroID = $_POST["maestro_id"];
|
||||
$maestroName = $_POST["maestro_name"];
|
||||
$email = $_POST["email"];
|
||||
|
||||
|
||||
update_maestro_info($maestroID, $maestroName, $email);
|
||||
|
||||
send_result_success();
|
||||
exit;
|
||||
|
||||
|
||||
function update_maestro_info($maestroID, $maestroName, $email) {
|
||||
global $db_conn;
|
||||
|
||||
$query = "
|
||||
UPDATE moty_maestro
|
||||
SET Name = ?, Email = ?
|
||||
WHERE MaestroID = ?
|
||||
";
|
||||
$stmt = $db_conn->prepare($query);
|
||||
$stmt->bind_param("ssi", $maestroName, $email, $maestroID);
|
||||
$stmt->execute();
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user