SitePoint Sponsor

User Tag List

Results 1 to 7 of 7

Hybrid View

  1. #1
    SitePoint Enthusiast dannbkk's Avatar
    Join Date
    Jan 2007
    Posts
    76
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Submits fine from Firefox but not IE?

    When submitted from IE gives me error
    All fields marked with '*' are required to be filled up.
    Please help as i tried to echo this out but still only same error?

    PHP Code:
    <?php

        
    if (isset($_POST['buy_submit2'])) {
            
    $seller_name $_POST['seller_name'];
            
    $biz_type $_POST['biz_type'];
            
    $budget ereg_replace("[^0-9]"""$_POST['budget']);
            
    $location $_POST['location'];
            
    $company_name $_POST['company_name'];
            
    $address $_POST['address'];
            
    $country $_POST['country'];
            
    $phone ereg_replace("[^[:space:]+0-9]"""$_POST['phone']);
            
    $email $_POST['email'];
            
    $biz_owner $_POST['biz_owner'];
            
    $what_type_of_biz $_POST['what_type_of_biz'];
            
    $reference $_POST['reference'];
            
    $cash_for_investment ereg_replace("[^0-9]"""$_POST['cash_for_investment']);
            
    $time_frame ereg_replace("[^a-zA-Z0-9]"""$_POST['time_frame']);
            
    $comment nl2br($_POST['comment']);
                if (
    $seller_name == '' || $biz_type == '' || $budget == '' || $location == '' || $country == '' || $phone == '' || $email == '' || $biz_owner == '' || $cash_for_investment == '' || $time_frame == '' || $comment == '') {
                    echo 
    "All fields marked with '*' are required to be filled up.";
                    echo 
    'Seller name: '.$seller_name.'<br />';
                    echo 
    'Biz type: '.$biz_type.'<br />'
                    echo 
    'Budget: '.$budget.'<br />'
                    echo 
    'Location: '.$location.'<br />'
                    echo 
    'Company Name: '.$company_name.'<br />'
                    echo 
    'address: '.$address.'<br />'
                    echo 
    'country: '.$country.'<br />'
                    echo 
    'phone: '.$phone.'<br />'
                    echo 
    'email: '.$email.'<br />'
                    echo 
    'Biz owner: '.$biz_owner.'<br />'
                    echo 
    'what type of biz: '.$what_type_of_biz.'<br />'
                    echo 
    'reference: '.$reference.'<br />'
                    echo 
    'cach for investment: '.$cash_for_investment.'<br />';
                    echo 
    'time frame: '.$time_frame.'<br />';
                    echo 
    'comment: '.$comment.'<br />';
                } elseif (
    $biz_owner == 'yes' && $what_type_of_biz == '') {
                      echo 
    'Please fill up the type of your business.';
                  } elseif (
    $biz_owner == 'yes' && $reference == '') {
                        echo 
    'Please fill up your business reference.';
                    } elseif (!
    eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$"$email)) {
                          echo 
    'Email is not validate.';
                      } else {
                            
    $query "INSERT into buy_biz (id, seller_name, biz_type, budget, location, company_name, address, country, phone, email, biz_owner, what_type_of_biz, reference, cash_for_investment, time_frame, comment) VALUES
                                     ('', '
    $seller_name', '$biz_type', '$budget', '$location', '$company_name', '$address', '$country', '$phone', '$email', '$biz_owner', '$what_type_of_biz', '$reference', '$cash_for_investment', '$time_frame', '$comment')";
                            
    mysql_query($query) or die("MySQL Error :" mysql_error());
                            echo 
    'Thank you, we will get back to you as soon as possible.';
                        }
        } else {
          }
    ?>
    Learn SEO - Join the community at GSEO.net
    SEO Book - SEO Revenge eBook
    Make Money Programs - No Fluff!
    Make Money Online

  2. #2
    SitePoint Wizard silver trophy Jelena's Avatar
    Join Date
    Feb 2005
    Location
    Universum, 3rd Corner
    Posts
    3,000
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    What error does it give you?
    -- Jelena --

  3. #3
    SitePoint Enthusiast dannbkk's Avatar
    Join Date
    Jan 2007
    Posts
    76
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    "All fields marked with '*' are required to be filled up."
    Learn SEO - Join the community at GSEO.net
    SEO Book - SEO Revenge eBook
    Make Money Programs - No Fluff!
    Make Money Online

  4. #4
    SitePoint Zealot
    Join Date
    Aug 2005
    Posts
    122
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    that has nothing to do with php

    thats some javascript validation you have on your form that failing in ie.

  5. #5
    SitePoint Enthusiast dannbkk's Avatar
    Join Date
    Jan 2007
    Posts
    76
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There is no javascript on the page...
    Learn SEO - Join the community at GSEO.net
    SEO Book - SEO Revenge eBook
    Make Money Programs - No Fluff!
    Make Money Online

  6. #6
    SitePoint Wizard bronze trophy Kailash Badu's Avatar
    Join Date
    Nov 2005
    Posts
    2,560
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Please post the actual form . And does the problem occur only when you hit the 'Enter' from keyboard to submit the form and not when you click on the submit button? If so, use a hidden text control(or $_SERVER['REQUEST_METHOD'] == 'POST') to check if a form has been submitted instead of $_POST['buy_submit2']

  7. #7
    SitePoint Evangelist optl's Avatar
    Join Date
    Oct 2004
    Location
    Washington DC
    Posts
    415
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think you left out some of the code by accident. You need to include the form as well.
    For the phrase "Bethesda home architect", my clients
    websites occupy 6 of the first 8 results
    on the 1st page of Google. My Secret SEO Strategy Revealed


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
  •