Ok, I am beginning to learn PHP after taking a few VB classes and messing around with PHP. One thing I am majorly having a problem is variables. I was trying one of the first things in PHP, and thats defining a variable in a URL (ie- ?p=about) anyway, I coded everything that was put into the book:
<?php
/* This page my have numerous lines of code containing the following print statement */
print "<H2> <CENTER> <B> Hello, $FirstName. </b> </CENTER> </H2> <BR>\n";
/* This page may have more code after the print statement we are focusing on. */
?>
anyway, when i go to the url: file.php?FirstName=Aaron I get the following message: Notice: Undefined variable: FirstName in file.php on line 2
Hello .
I have an apache server installed onto my computer that allows me to use PHP without a webhost, some of my other scripts are working, but why isn't this one?
Also, could someone please explain when to use " compared to ' ?
Thanks, Help would be gratefully appreciated