Need Help
Posted: Thu May 28, 2009 5:54 pm
Hello Everyone,
I m new to php and trying to develop a basic application using php.
What I am trying to do :
1. Create a Button
2. Whenever user click that button it should display different message.
For example, 1st click -- Hi
2nd click -- How are you?
Here is my code ....
Now my question is......
I want that "Click Me!" button after this output. In addition, if it clicked again then it should display other message (how are you).
Can any one please give their inputs....?
Thanks
I m new to php and trying to develop a basic application using php.
What I am trying to do :
1. Create a Button
2. Whenever user click that button it should display different message.
For example, 1st click -- Hi
2nd click -- How are you?
Here is my code ....
Code: Select all
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
</head>
<body>
<form method="post" action="count.php">
<input type="submit" value="Click me!" name = "action" />
</form>
</body>
</html>
count.php
<?php
FactCount();
function FactCount()
{
if($_POST['action'] == 'Click me!')
echo "<h4>Hi </h4>";
I want that "Click Me!" button after this output. In addition, if it clicked again then it should display other message (how are you).
Can any one please give their inputs....?
Thanks