Jump to content

hax

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Posts posted by hax

  1. Hello, thanks for this geek forum

    im really finding for answer

    I have Appserv in my computer, with PHP/MySqL

    what's PHP CLI binary?

    and how can i get the path of "PHP CLI binary"

    thanks for your help & sorry for my bad english
  2. I wrote a simple example, try what I wrote

    test.php (file)
    [code]<?php
    echo "<form align='center' method=post action='t.php'>";
    echo "Data 1:";
    echo "<br /><input type=text name='data1'>";
    echo "<br /><br />Date 2:";
    echo "<br /><input type=text name='data2'>";
    echo "<br /><br />";
    echo "<input align='center' type=submit value='Submit'>";
    echo "</form>";
    ?>[/code]

    t.php (file)
    [code]<?php
    if ($REQUEST_METHOD=="POST") {
    $date_a = strtotime($_POST['data1']);
    $date_b = strtotime($_POST['data2']);
    $days = ($date_b - $date_a) / (60*60*24);
    echo number_format($days);
    } else {
    //have no posts
    echo "error";
    }
    ?>[/code]

    It should work well.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.