Reply
Form not posting in IE
Old 05-07-2008, 09:19 PM Form not posting in IE
Novice Talker

Posts: 7
Hi guys,

Well this has never happened to me before. I've upgraded a PHP4 app to PHP5 and my registration form won't work on IE, while it works absolutely fine on Firefox and Safari, so I'm pretty sure the functionality is correct.

In fact even if I comment out all the form process code and just get it to echo something when the "Register" button is clicked, I get no love there either, so it's as though IE is not recognising any posted items at all.

Would appreciate any help I can get on this.
pingo is offline
Reply With Quote
View Public Profile
 
Sponsored Links (We share ad revenue):
 
Old 05-07-2008, 09:35 PM Re: Form not posting in IE
Skilled Talker

Posts: 50
Can you post the code?
kbfirebreather is offline
Reply With Quote
View Public Profile
 
Old 05-07-2008, 09:58 PM Re: Form not posting in IE
Average Talker

Posts: 15
Name: Mark
It sounds like either the javascript isnt correct or most likly that the PHP variable is not being submited correctly via the IE browser.

Please paste code.
Datingsoftware is offline
Reply With Quote
View Public Profile
 
Old 05-07-2008, 10:35 PM Re: Form not posting in IE
Novice Talker

Posts: 7
Sorry guys the code is quite long.
Code:
    <?php 
        $errormessage = "Please complete all fields and provide a valid email address, as this is where we'll send your account details";
        $completed = "";
        $email = $firstname = $lastname = $phone = $address = $suburb = $postcode = $city = $state = $country = "";
        if(isset($_POST['register'])){
        
            $completed = false;
            
            $email = $_POST['registration_email'];
            $firstname = $_POST['registration_firstName'];
            $lastname = $_POST['registration_lastName'];
            $phone = $_POST['registration_phone'];
            $address = $_POST['registration_address'];
            $suburb = $_POST['registration_suburb'];
            $postcode = $_POST['registration_postcode'];
            $city = $_POST['registration_city'];
            $state = $_POST['registration_state'];
            $country = $_POST['registration_country'];
            
            
            $fields = array("email address" => $email, "first name" => $firstname, "last name" => $lastname, "contact phone" => $phone, "address" => $address, "suburb" => $suburb, "postcode" => $postcode, "city" => $city);
            $incomplete_fields = array();
            
            $result = mysql_query("SELECT * FROM users WHERE email = '$email'");
            if(mysql_fetch_row($result)){
                $errormessage = "<strong>$email has already been registered</strong>";
                $email = "";
                $completed = false;
            }
            else {
                
                foreach($fields as $field=>$value){
                    if(!$value) array_push($incomplete_fields, $field);
                }

                if(count($incomplete_fields) > 0){
                    $errormessage = "To complete your registration please provide your <strong>";
                    for($i = 0; $i < count($incomplete_fields); $i++){
                        if($i == count($incomplete_fields) - 1)
                            $errormessage .= "and ".$incomplete_fields[$i].".";
                        else $errormessage .= $incomplete_fields[$i].", ";
                    }
                    
                    $errormessage .= "</strong>";
                }
                else {
                    $member = new User($email);
                    $member->edit("firstname", $firstname);
                    $member->edit("lastname", $lastname);
                    $member->edit("phone", $phone);
                    $member->edit("address", $address);
                    $member->edit("suburb", $suburb);
                    $member->edit("postcode", $postcode);
                    $member->edit("city", $city);
                    $member->edit("state", $state);
                    $member->edit("country", $country);
                    $member->edit("status", "inactive");
                    $member->edit("date", time());
                    $password = $member->createRandomPassword();
                    $completed = true;
                    
                    $mail = new PHPMailer();
                    $mail->From = "customersupport@applicationaddress.com";
                    $mail->FromName = "webapplication";
                    $mail->Subject = "Your Registration Details";
                    $mail->AddAddress($email);
                    
                    $body = "Hello ".$firstname."!\n\n";
                    $body .= "Welcome to the application! You can login to your account using this email address and the following password: $password \n\n";
                    $body .= "If you have any trouble please email us at support@applicationaddress.com.\n\n";
                    $body .= "The application Team";
                    $mail->Body = $body;
                    $mail->WordWrap = 50;
                    $mail->Send();                                                            
                }
                
            }
            
        }
    
        if(!$completed) { ?>
            <h2>your closet</h2>
            <div class="bodycopy">
            <p>If you haven't yet registered. You can begin the registration process by completing the registration form on this page.</p>
            <h2>Register</h2>
            <p class="blue"><?php echo $errormessage ?></p>
                <div class="webform">
                    <form method="post" action="/ThisPage/">
                        <div class="formField halfwidth">
                            <label for="registration_firstName">First name</label>
                            <input type="text" id="registration_firstName" name="registration_firstName" value="<?php echo $firstname ?>" />
                        </div>
                        <div class="formField halfwidth nomargin">
                            <label for="registration_lastName">Last name</label>
                            <input type="text" id="registration_lastName" name="registration_lastName" value="<?php echo $lastname ?>" />
                        </div>
                        <div class="clear"></div>
                
                        <div class="formField halfwidth">
                            <label for="registration_email">Email address</label>
                            <input type="text" id="registration_email" name="registration_email" value="<?php echo $email ?>" />
                        </div>
                
                        <div class="formField halfwidth nomargin">
                            <label for="registration_phone">Contact phone</label>
                            <input type="text" id="registration_phone" name="registration_phone" value="<?php echo $phone ?>" />
                        </div>
                
                        <div class="clear"></div>
                        
                        <div class="formField">
                            <label for="registration_address">Address</label>
                            <input type="text" id="registration_address" name="registration_address" value="<?php echo $address ?>" />
                        </div>
                
                        <div class="clear"></div>
                        <div class="formField halfwidth">
                            <label for="registration_suburb">Suburb</label>
                            <input type="text" id="registration_suburb" name="registration_suburb" value="<?php echo $suburb ?>" />
                        </div>
                        
                        <div class="formField halfwidth nomargin">
                            <label for="registration_city">City</label>
                            <input type="text" id="registration_city" name="registration_city" value="<?php echo $city ?>" />
                        </div>
                        
                        <div class="formField halfwidth">
                            <label for="registration_postcode">Postcode</label>
                            <input type="text" id="registration_postcode" name="registration_postcode" value="<?php echo $postcode ?>" />
                        </div>
                        
                        <div class="formField halfwidth nomargin">
                            <label for="registration_state">State</label>
                            <select id="registration_state" name="registration_state">
                                <option value="state1">state1</option>
                                <option value="state2">state2</option>
                                <option value="state3">state3</option>
                                <option value="state4">state4</option>
                                <option value="state5">state5</option>                    
                            </select>
                        </div>
                        
                        <div class="formField halfwidth">
                            <label for="registration_country">Country</label>
                            <select id="registration_country" name="registration_country">
                                <option value="country1">country1</option>
                                <option value="country2">country2</option>
                                <option value="Other">Other</option>
                            </select>
                        </div>
                        <div class="formField halfwidth nomargin">
                            <input type="image" class="button" src="../images/button-register.gif" width="78" height="31" alt="Register" id="register" name="register" value="register" />
                        </div>
                        <div class="clear"></div>
                    </form>
                </div>
    
    <!-- if the registration has been successful -->
    <?php } else { ?>
        <h2>registration successful!</h2>
        <div class="bodycopy">
        <p>Thanks for Registering!</p>
    <?php  } ?>
pingo is offline
Reply With Quote
View Public Profile
 
Old 05-07-2008, 10:36 PM Re: Form not posting in IE
Novice Talker

Posts: 7
Hmm could it be because I am using an image to submit rather than a button?
pingo is offline
Reply With Quote
View Public Profile
 
Old 05-07-2008, 11:02 PM Re: Form not posting in IE
Average Talker

Posts: 15
Name: Mark
It wouldnt be the image as the form is being submited correctly.

Have you tested to see which section is failing in IE?
Datingsoftware is offline
Reply With Quote
View Public Profile
 
Old 05-07-2008, 11:34 PM Re: Form not posting in IE
Novice Talker

Posts: 7
Not yet I will do so shortly; I didn't realise the form wasn't being submitted in IE since I've not had this problem before. It's quite perplexing!
pingo is offline
Reply With Quote
View Public Profile
 
Old 05-08-2008, 07:42 AM Re: Form not posting in IE
Novice Talker

Posts: 7
Hi guys,

Turns out it was submitting using an input image:
http://www.webmasterworld.com/forum88/4894.htm

Just in case anyone else comes across it - it's a first for me!
pingo is offline
Reply With Quote
View Public Profile
 
Sponsored Links (We share ad revenue):
 
Reply     « Reply to Form not posting in IE
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML


Page generated in 0.16121 seconds with 14 queries