No offense taken, but I have never done this before so I don't really know
what I'm doing with the variable passing and stuff (aside from C++ and VB
knowledge).  I  copied that from the book exactly and it did not work.

Your form does not work either, it simply gives me the else statement's
actions ("No data yet, or $username is empty.").  I do believe I hit the bug
they were talking about and am now thinking of getting Linux from my boss
too install and run for PHP.  Thanks for the help.

"Devon Knowles" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> No offense, but you are doing something completely wrong.  For starters,
> your <form> has neither a method nor an action. Try this code, if you have
> Apache and PHP installed correctly, it will work. Even on XP.
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> <html>
> <head>
>  <title>Test Form</title>
> </head>
> <body>
> <form action="<?= $PHP_SELF ?>" method="post">
> <input type="text" name="username"><br>
> <input type="submit" value="Post Data">
> </form>
> <?
> if ($username)
> {
>  echo "<b>Username:</b> " . $username;
> } else
> {
>  echo "<i>No data yet, or \$username is empty.</i>";
> }
> ?>
> </body>
> </html>



-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to