R
R
Roman2019-03-13 00:24:15
Drupal
Roman, 2019-03-13 00:24:15

Editing pages in the admin?

Good evening.
When you select a page in the admin panel and click edit, it redirects to the main site design, to this page, and all editing functions are already provided there.
For some reason, it seemed that there was editing in the admin panel directly, while maintaining the design of the admin panel (it would be more convenient).
Or am I wrong please explain

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ildar Gizetdinov, 2016-11-13
@verdex

// выводим в HTML-таблицу все данные клиентов из таблицы MySQL 
  while($data = mysqli_fetch_array($wwwlist)){ 
    echo '<tr>';
    echo '<td>' . $data['name'] . '</td>';
    echo '<td><textarea name = "data[' . $data ['unid'] . '][email]">' . $data ['email'] . '</textarea></td>';
    echo '<td> <textarea name = "data[' . $data ['unid'] . '][indexfiles]">' . $data ['indexfiles'] . '</textarea></td>';
    echo '<td> <textarea name = "data[' . $data ['unid'] . '][alias]">' . $data ['alias'] . '</textarea></td>';
      echo '<td> <textarea name = "data[' . $data ['unid'] . '][charset]">' . $data ['charset'] . '</textarea></td>';
    echo '</tr>';
  }

foreach ($_POST["data"] as $id => $fields) {
//UPDATE table WHERE unid = $id SET email = $fields[email], indexfiles= $fields[indexfiles]
}

P
Paul Denisevich, 2016-11-13
@deniamnet

Save the record ID for each row in the hidden field and then update it in the database using it. Although, of course, the code is far from ideal and it is desirable to use some other tokens (but this is a topic for a separate question).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question