I'm reading an article on MySQL/PHP at
http://hotwired.lycos.com/webmonkey/...tw=programming
It's very good for me starting out but I have a question.
I'm using OS X Panther 10.3.2
MySQL 4.0.15
PHP 4.3.2 (cli) (built: Sep 13 2003 22:04:20)
Copyright (c) 1997-2003 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2003 Zend Technologies
Apache/1.3.29 (Darwin)
Following the tutorial things are looking good up until "Throw in Some
Forms" in Lesson 2.
http://hotwired.lycos.com/webmonkey/...tw=programming
There is a form as follows
.....snip..............
if ($submit) {
// process form
while (list($name, $value) = each($HTTP_POST_VARS)) {
echo "$name = $value<br>\n";
}
} else{
// display form
.....snip..............
and the next form after that also.
I pull up the forms which I have called fpage2.php and fpage3.php
In the first form fpage2.php, it should display the input fields the
first time you access it. Then when you fill it in, 'submit' now has a
value, so the return page should list the values just entered. It
doesn't, it just shows the form again.
In the next form fpage3.php, it should display the input fields the
first time you access it. Then when you fill it in, 'submit' now has a
value, so the return page should display "Thank you! Information
entered." and the data should be inserted into mydb. It doesn't, it
just shows the form again.
So it's as if the 'if/else' statement doesn't get a positive with the
if ($submit) {
and so it just moves on to the 'else'.
I just copied and pasted ther forms into a file using VI on the
command line and didn't edit them in any way.
Now this was for PHP 3. Is that fact that I have PHP 4 a problem. Is
there a change I should make?
Any help would be appreciated.
Thanx
rmc