please help me
i want built php cli click button next

<form method="post" action="/get.php">
<input type="hidden" name="dari" value="">
<input type="hidden" name="user" value="uugb586">
<button type="submit" name="action" value="Close" class="btnx"> close (x)</button> &nbsp;
<button type="submit" name="action" value="Read" class="btne"> next >> </button>
</form>

    Command line PHP has no concept of HTML and form elements within them. To PHP it's just a bunch of text. You would probably need to run it through some type of web browser emulator if you want to execute it via CLI, as it's the browser that figures out what to do with a HTML.

    If you just want a CLI script to submit to a URL, you could use the cURL functions.

      Most times, PHP runs on a web server out there on the internet somewhere. Buttons are defined when your browser loads HTML code like the code you just posted.

      If you want some PHP code to run on the server, then your form looks like it'll do that. You just need to put the code you want to run in the get.php file on your server.

      If you want PHP to run via Command Line Interface (CLI) then you could put something like this in get.php:

      $last_line_of_output = exec("ls -l");

      Not every server is configured to allow exec to run.

        Third, if you're wanting to put an HTML-based UI over a console application instead of using the command line interface, you'd effectively be writing a small web site to hold the HTML and PHP. You can use PHP's inbuilt web server to host the site and then point your web browser at that.

        If none of these suggestions are going in the direction you want, you'll need to explain yourself better. But keep in mind: Command Line Interfaces by definition don't have "buttons" to "click".

          Write a Reply...