Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Oct 2004
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    HTML form + php script + <not> Konqurer browser fails

    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.

    Doug

  • #2
    Senior Coder
    Join Date
    Aug 2003
    Location
    One step ahead of you.
    Posts
    2,815
    Thanks
    0
    Thanked 3 Times in 3 Posts
    PHP is browser independent. The HTML is screwed up.

  • #3
    Regular Coder trib4lmaniac's Avatar
    Join Date
    Feb 2004
    Location
    Cornwall, UK
    Posts
    535
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Code:
    <form action="next_pg.php">
      <input type="text" name="foo" />
      <input type="submit" name="bar" value="Next" />
    </form>
    Will work in pretty much any browser. (Sends the values of "foo" and "bar" to "next_pg.php")

  • #4
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,987
    Thanks
    4
    Thanked 2,660 Times in 2,629 Posts
    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.

  • #5
    New to the CF scene
    Join Date
    Oct 2004
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Grrrr, memo to self...learn to type

    The problem was totally inane. My html file had the following:

    <form>
    <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.

    Doug


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •