SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Jan 2004
    Location
    South Coast, UK
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Angry Cross Browser Compatibility IE v Mozilla

    I'm baffled by something that should be so simple to fix. Here's the problem:

    I am submitting data on a form, thus

    PHP Code:
    <input type="submit" name="submitbooking" value="Submit"></td
    as one would expect.

    I am catching the form, thus

    PHP Code:
    $submitbooking $_POST['submitbooking'];
    if (isset(
    $submitbooking))
    {
    //process the form 
    In IE this sequence works fine. In Mozilla the IF doesn't work, regardless of whether I use isset or someother device.

    However, if I add a line

    PHP Code:
    echo $submitbooking
    between
    PHP Code:
    $submitbooking $_POST['submitbooking']; 
    and

    PHP Code:
    if (isset($submitbooking))

    the IF statement will work in Mozilla.

    Any ideas?

  2. #2
    SitePoint Enthusiast mullen's Avatar
    Join Date
    Jul 2004
    Location
    Durham, UK
    Posts
    82
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    A couple of things...

    1. You are setting the var $submitbooking just before the IF statement, so your IF will always be TRUE, regardless of whether or not the submit button was pressed.

    2. What happens inside your IF statement? As this is server-side, it doesn't matter what browser you're using. The only thing the browser sees is the HTML that your code generates, so double check what you're outputting.

    Cheers,
    Dan


Bookmarks

Posting Permissions

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