Home>

I am developing with Wordpress and I want to change what is displayed on the page by IF, but it doesn't work.

Course list page: "wp-admin? Course list page"
In the course list page, if URL parameters by GET such as "Edit course" and "Clear course" are not sent, a list of courses is displayed.
If i click to edit, click "wp-admin? Course list page&course edit page",
If i click Delete, I would like to display it separately from "wp-admin? Course List Page&Course Delete Page".
At present, if you do not send the URL parameter by GET, the list of courses should be displayed but not displayed.

If i have not sent either the Edit Course Page or the Delete Course Page parameter, the Course List will be displayed.
If not, I would like to display the course edit page if I am editing a course and the course erase page if I am deleting a course.

Reminder

(is_null ($select, $delete)) specifies two, and if the parameters on the course edit page and the course erase page are NULL, require_once I'm trying to display a "page", but I think it's because the grammar here is different or it doesn't exist.

I would appreciate it if you could tell me the correct grammar/correct way.

Also, if you do not specify two
(is_null ($select))
If only "Echo" is clicked, echo is displayed.
Click "Clear Course" in this state to display the course list page.

If $delete instead of $select, the result is reversed.

Why this idea ...

this page of the PHP manual,
var_dump (isset ($a, $b));// TRUE
I wondered if I could see multiple variables by looking at the part.
It was like this ⇓
$select is null $delete is null ⇨ Course list
$delete with $select is NULL ⇨ to else
$select has NULL $delete ⇨ Go to else

If i come to else ...
There is $select ⇨ Edit course with echo
$select is NULL ⇨ Next…

There is $delete ⇨ Delete the course with echo

The problem area
$select = $_GET ['courseselect'];$delete = $_GET ['coursedelete'];
 if (is_null ($select, $delete)) {
    // Course list ⇓ Each course list has items such as "Edit Course" and "Clear Course" next to each course
    require_once ('/home/users/1/hoge.jp-hogehogehogehoge/web/hogehoge/wp-content/themes/ALC/adminpage/sysytemset/courselist.php');
 } else {
     if (isset ($select)) {
         echo 'Edit course';
     }
     if (isset ($delete)) {
         echo 'Clear course';
     }
 }


This is the code for require_once.
Ask a previous question about this for reference

print ('<tr>');
                print ('<td>');
                $course = $a_course ["Tables_in_hogehoge-hogehoge"];
                echo "$course";
                print ('</td>');
                print ('<td>');
                $title1 = 'Edit course';
                $url = admin_url ();
                print '<a href = "'. $url. 'admin.php? page = hogehoge_system_setting&courseselect ='. $course. '">'. $title1. '</a><br />';
                print ('</td>');
                print ('<td>');
                $title2 = 'Clear course';
                $url = admin_url ();
                print '<a href = "'. $url. 'admin.php? page = hogehoge_system_setting&coursedelete ='. $course. '">'. $title2. '</a><br />';
                print ('</td>');
                print ('</tr>');