I'm in the process of teaching myself PHP using both a Wrox and Peachpit Press book as reference, but keep getting the same error (Notice: Undefined variable: WebSites in c:\inetpub\wwwroot...) every time I attempt to use an HTML form to gather information and a PHP script to display it. This happens with examples from both books. That would seem to me to be a PHP setting problem, but I'm stumped. Here's the Wrox HTML code:
Name of file: textarea.html
<FORM ACTION="textarea.php" METHOD=POST>
What are your favourite web sites?
<TEXTAREA NAME="WebSites" COLS="50" ROWS="5">
[url]http://[/url]
[url]http://[/url]
[url]http://[/url]
[url]http://[/url]
</TEXTAREA>
<BR>
<BR>
<INPUT TYPE=SUBMIT>
and the WROX PHP code:
Name of file: textarea.php
<?php
echo $WebSites;
?>
Also the Wrox book uses echo in a PHP script to print something on the screen, while the Peachpit Press book uses print. Which is correct, or more importantly the best practice. Thanks!