<?php if (!isset($_GET['id'])) { die('no found image'); } if (isset($_GET['error']) && $_GET['error'] == 'true') { echo "edit fail"; } if (isset($_GET['error']) && $_GET['error'] == 'false') { echo "edit success"; } require_once PLUGIN_PATH . 'includes/My-images-table.php'; $obj = new My_images(); $image = $obj->find($_GET['id']); $image = $image[0]; //var_dump($image); ?> <h2>Edit image :</h2> <div class="my-block"> <form action="<?php echo PLUGIN_URL . 'my-images.php?act=edit&id=' . $image['id']; ?> " method="post" accept-charset="utf-8"> <table class="form-table"> <tbody> <tr> <td><label for="img-title">title :</label></td> <td> <input type="text" name="img_title" id="img-title" class="regular-text" value="<?php echo $image['title']; ?>