I am a noob to PHP just wondering why are we writing the php script in the body tag of HTML.
I am just taking a word on one page and directing it to another page using the post method. below is the code.
page1.html
<form action="disp.php" method="post">
Enter a word: < input type="text" name="word" />
disp.php
this goes inside the body tag
$word=$_POST['word'];
echo $word;
All your help is highly appreciated.