Exemple #1
0
<?php

include_once 'controller/ApiYandexController.php';
$start = new ApiYandexController();
$id = (int) $_GET['id'];
$data = false;
if ($_POST) {
    $data = $start->updateUser($_POST);
    header('Location:index.php');
}
if ($id) {
    $user = $start->actionUpdate($id);
    $username = explode(' ', $user->username);
} else {
    die;
}
?>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <link href="css/main.css" type="text/css" rel="stylesheet">
</head>
<body>
    <div class="body">
        <div class="menu">
            <a href="index.php">Назад</a>
        </div>
        <hr>
        <h3>Редактирование пользователя: <b><?php 
echo $user->username ? $user->username : '';