hax
-
Posts
4 -
Joined
-
Last visited
Never
Posts posted by hax
-
-
For including PHP in HTML files just do like this:
[code]
HTML here
<?php
include("path/to/file.php");
?>
HTML continue here
[/code] -
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 -
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.
Login System -- not working
in PHP Coding Help
Posted
[code] <form name="login" method="post" action="php_self">[/code]
to:
[code] <form name="login" method="post" action="$PHP_SELF">[/code]