Jump to content

hax

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

hax's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. change: [code] <form name="login" method="post" action="php_self">[/code] to: [code]  <form name="login" method="post" action="$PHP_SELF">[/code]
  2. For including PHP in HTML files just do like this: [code] HTML here <?php include("path/to/file.php"); ?> HTML continue here [/code]
  3. 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
  4. 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.