Hi, dear WROX programmers. I recently purchased a book of yours, called Beginning PHP. I loved how much
that language appealed to me, until one of the source code examples in that book did not work. Logically, it should work, it just
doesn't, and since it's one about declaring a variable outside a php file, it's vital to my advance. I am hereby sending you the
code which is entered in the HTML file, followed by the php one. Please, reply to me at m_milkov@h..., to let me know what
might be wrong. text.html :
Who is your favourite author?
and here is text.php :
Your favorite author is:
You see, it should work, but all I get is "Your favorite author is: " and no input. What's wrong?!? Reply, plese.
Milko D. Milkov
MSN 8 helps ELIMINATE E-MAIL VIRUSES. Get 2 months FREE*.
Where do you set a value to $Author ??? because like this the value stored
in $Author = null or '' (nothing). so somewhere you should set a value.
That can be done by a form's
<form name="author" method="get" action="....php">
<input type="text" name="Author" value="">
<option value="" selected>Make your choice</option>
<input type="submit" value="Submit" name="submit">
But like this nothing will ever come as your favourite author. You can set
it fixed as wel like
$Author = "Shakespear";