PHP print message

MayncUsandy

New Member
i want to print a message from php code, when the user clicks on button. I added code in php, and placed and if condition that executes when the user clicks on the button.Here's the code of default.php:\[code\] <?phpif (isset($_POST['button1'])) {echo '<b>Ok.</b>';}?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><script type="text/javascript"></script><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>PHP3</title></head><body><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><form id="form1" name="form1" method="post" action="default.php"> <p> <label for="textfield1">User Name</label> <input type="text" name="username" id="username" /> </p> <p> <label for="textfield2">Password</label> <input type="password" name="password" id="password" /> </p> <p> <input type="submit" name="button1" id="button1" value="http://stackoverflow.com/questions/10559626/Submit" /> <br /> <br /> <label id="label1"> </label></p> <p>&nbsp;</p></form><p>&nbsp;</p></body></html>\[/code\]"Ok" should be printed.But i see no "Ok" message get printed.What can i do?Thanks
 
Back
Top