View Full Version : HTML form + php script + <not> Konqurer browser fails

10-21-2004, 06:34 PM
I have two small bits of code.
One HTML file that is a form - one text field, one submit button, user inputs a site name, hits submit, and the form action launches a php script.
One PHP file that takes the site name entered on the form, connects to a MySQL db, runs the query, and dumps the results to the screen.

If I run these file in Konqurer, it works like a charm.
If I run it with Firefox, Mozilla, or IE, the 'submit' button causes the HTML form to reload.

I'm new to all of the tools below - if I'm in the wrong place, feel free to point me to the right reference site.

I'm running
Apache 2x
PHP 4x
Mandrake 10.0

Sorry I haven't posted the code, but it's at home and I'm not. If you take any beginning form/php example from any book, it's the same thing.

TIA for any tips or pointers.


10-21-2004, 07:03 PM
PHP is browser independent. The HTML is screwed up.

10-22-2004, 12:39 AM
<form action="next_pg.php">
<input type="text" name="foo" />
<input type="submit" name="bar" value="Next" />
Will work in pretty much any browser. (Sends the values of "foo" and "bar" to "next_pg.php")

10-22-2004, 02:23 AM
Are you running this in your own environment? I installed Apache 2.x on my windows system, and found that I couldn't get it to correctly launch on my computer at all. So I downed it to Apache 1.3.29 and it did the trick. If not, then its for sure the HTML.

10-22-2004, 03:57 PM
The problem was totally inane. My html file had the following:

<form action....>

The use of nested form tags sorta works in Konq but not in other browsers. Remove the first <form> tag and, MAGIC, it works.

Many thanks for the replies, I appreciate the help.