Hi, i need to learn function with $_post, but here what happens:
page one:
<HTML>
<HEAD></HEAD>
<title> Funkcija </title>
<BODY bgcolor="black" text="white">
<form type="post" action="/funkcija.php">
Lets look, does this number can be divided from 2. <br>
Your number: <input type="text" name="a"> <br>
<input type="submit" value="Lets check!">
</BODY>
</HTML>
Everything was ok here, result is simple, you should know, but now the problem
<HTML>
<HEAD></HEAD>
<title> Rezultatas </title>
<BODY bgcolor="black" text="white">
<h3 align="center"> <B> Your result</B> </h3>
<BR>
<BR>
<?php
$a = $_post [a];
function lygu ($a)
{
if ($a % 2 == 0)
{ echo "Number can be divided";
}
else
{
echo "Number cannot be divided";
}
echo lygu ($a);
}
?>
<a href="/index.php"> try again??
<br>
</BODY>
</HTML>
When i click submit in first page, this is my result:
"Your result
try again??"
P.S. I must use funtion at this, if something's wrong, please rewrite command and make bold/italic text where it has changed. Thank you very much.
Thanks