Ken2k7 Posted May 3, 2009 Share Posted May 3, 2009 <form method="post"> <input type="submit" name="submit" value="submit" /> </form> <?php if (isset($_POST['submit'])) echo 'Hello World'; ?> That would do it. Quote Link to comment Share on other sites More sharing options...
Pete C Posted May 3, 2009 Author Share Posted May 3, 2009 Thanks ken I will try it BUT could I push you to modify this code so that it uses a function? Many thanks Pete C Quote Link to comment Share on other sites More sharing options...
Ken2k7 Posted May 3, 2009 Share Posted May 3, 2009 <?php function do () { echo 'Hello World'; } ?> <form method="post"> <input type="submit" name="submit" value="submit" /> </form> <?php if (isset($_POST['submit'])) do(); ?> Quote Link to comment Share on other sites More sharing options...
Pete C Posted May 3, 2009 Author Share Posted May 3, 2009 Thanks Ken that will do nicely. Bit of a learning curve this php - and yes I have found W3 schools! Pete C. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.