Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8440627
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T08:20:28+00:00 2026-06-10T08:20:28+00:00

I have the following forms that are rendered by some PHP logic. The forms

  • 0

I have the following forms that are rendered by some PHP logic. The forms render fine; you can see the text inputs and submit button and all.

In IE the forms work as expected. The first form goes to ‘index.php?subscribe=go’ and the second to ‘index.php?unsub=go’, but in FF and Chrome, clicking the submit button reloads the page (does not go to form action). I have not checked other browsers.

I found in Firebug that the <form> tag doesn’t even exist on the page in Firefox. This is very strange; check it out:

else
    {
        echo '<div class="subs_main">';
        if (isset($_GET['subscribe']))
        {
            if ($_GET['subscribe'] != 'go')
            {?>
                Subscribe to <b>Bella Blog</b> for specials, sales, news and more!
                <br />
                <form action="index.php?subscribe=go" method="post" name="subscribe_form" onsubmit="return checkForm();">
                Name: <input type="text" name="name" size="15" />
                <br />
                Email: <input type="email" name="email" size="20" />
                <br />
                <input type="submit" value="subscribe!" name="submit" />
                </form>
                <p class="unsub">You can <a href="index.php?unsub">unsubscribe</a> at any time</p>
            <?php
            } 
            else
            {
                // subscribe user

            }
        }
        elseif (isset($_GET['unsub']))
        {
            if ($_GET['unsub'] != 'go')
            {?>
                Sorry to see you go! You can <a href="index.php?subscribe">re-subscribe</a> at any time!
                <br />
                <form onsubmit="return checkForm2()" name="unsub_form" method="post" action="index.php?unsub=go">
                Email: <input type="email" name="email" size="20" />
                <br />
                <input type="submit" value="unsubscribe" name="submit" />
                </form>
            <?php 
            }
            else
            {
                // process unsubscription HERE

            }
        }
        echo '</div>';
    }

This is the JS for form validation (negligible I think because it works in IE and I get the same result when commenting this script out):

<script type="text/javascript" language="javascript">
function checkForm()
{
    var regex = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,6}$/;
    var form = document.forms.subscribe_form;
    var name = form.name.value;
    var email = form.email.value;

    if (name == '' || email == '')
    {
        alert('You must enter both your name and email address!');
        return false;
    }
    else if (!email.match(regex))
    {
        alert('You must enter a valid email!');
        return false;
    }
    return true;
}
function checkForm2()
{
    var form = document.forms.unsub_form;
    var email = form.email.value;

    if (email == '')
    {
        alert('You must enter an email address!');
        return false;
    }
    return true;
}
</script>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T08:20:30+00:00Added an answer on June 10, 2026 at 8:20 am

    The <form> tag doesn’t exist? Unless you have code that tailors the output to the USER_AGENT, any browser that passes a given set of GET/POST input to the page should receive identical output. It’s possible, of course, that they’ll render the page and respond to events in (potentially significantly) different ways, but the source code should be identical.

    Post the page source and we can look and see what the issue might be.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple model forms, that is being rendered through the following jinja2
I have XML in the following form that I want to parse with PHP
I have the following form in a Struts2 JSP that contains some radio buttons.
I'm looking at some Java classes that have the following form: public abstract class
I have a form that takes the following inputs: Name: IBM Surface(in m^2): 9
I have a simple html form that looks like the following <form action=search.php method=get>
I have a registration form that is rendered by the following urlconf -- url(r'^$',
I have a masterpage that render's the following PartialView: <% Html.RenderPartial(AddPage); %> AddPage Controller
I have the following paint event (form) that is drawing the rectangle: void LogicSimulationViewerForm_Paint(object
I have a following problem, I have HTML form that uploads a file with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.