Jump to content

nemiux

New Members
  • Posts

    7
  • Joined

  • Last visited

    Never

Everything posted by nemiux

  1. nemiux

    Function

    Sorry, stupid mistake, everything is right, but it still doesn't work. I'll look 2morrow, its evening in my time and i cant think normally
  2. http://w3schools.com is page for all web languages
  3. nemiux

    Function

    Here's the problem this time: Everything works, but it doesn't matter do i enter 2, 3, 5, it still writes number CAN be divided What is the problem?
  4. nemiux

    Function

    Look at command closely and rewrite what's wrong, function has 2 be used, u can change its position, thank you .
  5. nemiux

    Function

    rewriten to: <?php $a = $_POST ['a']; ..... Didnt help, still result is text and href to index.php
  6. nemiux

    Function

    doesn't help, its like function lygu ($a) { if ($a % 2 == 0) { echo "Number can be divided"; } else { echo "Number cannot be divided"; } doesn't exist...
  7. 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
×
×
  • 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.