Jump to content

[SOLVED] Form troubles with PHP in IE


dvdflashbacks

Recommended Posts

Hi,

 

I have a couple of forms that are not working correctly, but only in IE.  The forms work fine in Safari and in Firefox.  I also have used these forms in the past on another site and those work correctly in IE.  I am really stumped on this.

 

Can anyone take a look at this and see what I have done wrong.

 

The forms can be found at:

 

http://www.thehealthjournals.com/register.php

http://www.thehealthjournals.com/forgotpass.php

 

And these same forms working correctly in IE (different layout and CSS) can be found at:

 

http://www.nothingaboutnothing.com/admin/register.php

http://www.nothingaboutnothing.com/forgotpass.php

 

Thanks.

Link to comment
Share on other sites

whats the problem you are having?

 

oh, sorry.  If you look at this these forms in Safari/Firefox and submit with out filling out or filling out incorrectly, you will see the error messages as appropriate.  But in IE if you submit with errors or blank, the index.php page just loads as if nothing happened.

Link to comment
Share on other sites

can you post some code?

 

Sorry, here is the code for the register form:

<?php
/**
* The user is already logged in, not allowed to register.
*/
if($session->logged_in){
   echo "<h1>Registered</h1>";
   echo "<p>We're sorry <b>$session->username</b>, but you've already registered. "
       ."<a href=\"index.php\">Main</a>.</p>";
}
/**
* The user has submitted the registration form and the
* results have been processed.
*/
else if(isset($_SESSION['regsuccess'])){
   /* Registration was successful */
   if($_SESSION['regsuccess']){
      echo "<h1>Registered!</h1>";
      echo "<p>Thank you <b>".$_SESSION['reguname']."</b>, your account has been sent 'Somewhere' to be added into 'Nothing.'<br /> "
          ."You will now receive an email from 'Someone', asking you to activate your account.  Please check your email and activate your account before attemptig to login.<br /><br />"
  ."You can now go back to the <a href=\"index.php\">Main Page.</a>.</p>";
   }
   /* Registration failed */
   else{
      echo "<h1>Registration Failed</h1>";
      echo "<p>We're sorry, but an error has occurred and your registration for the username <b>".$_SESSION['reguname']."</b>, "
          ."could not be completed.<br>Please try again at a later time.</p>";
   }
   unset($_SESSION['regsuccess']);
   unset($_SESSION['reguname']);
}
/**
* The user has not filled out the registration form yet.
* Below is the page with the sign-up form, the names
* of the input fields are important and should not
* be changed.
*/
else{
?>

<h2>User Registration</h2>
<hr />
<?
if($form->num_errors > 0){
   echo "<td><font size=\"2\" color=\"#ff0000\">".$form->num_errors." error(s) found</font></td>";
}
?>
<form action="admin/process.php" method="POST">
<table align="left" border="0" cellspacing="0" cellpadding="3">
<tr><td><div align="right">Username:</div></td><td><input type="text" name="user" maxlength="30" value="<? echo $form->value("user"); ?>"></td><td><? echo $form->error("user"); ?></td></tr>
<tr><td><div align="right">Password:</div></td><td><input type="password" name="pass" maxlength="30" value="<? echo $form->value("pass"); ?>"></td><td><? echo $form->error("pass"); ?></td></tr>
<tr><td><div align="right">Confirm Password:</div></td><td><input type="password" name="pass2" maxlength="30" value="<? echo $form->value("pass2"); ?>"></td><td><? echo $form->error("pass2"); ?></td></tr>
<tr><td><div align="right">Email:</div></td><td><input type="text" name="email" maxlength="50" value="<? echo $form->value("email"); ?>"></td><td><? echo $form->error("email"); ?></td></tr>
<tr><td><div align="right">First Name:</div></td><td><input type="text" name="first_name" maxlength="50" value="<? echo $form->value("first_name"); ?>"></td><td><? echo $form->error("first_name"); ?></td></tr>
<tr><td><div align="right">Last Name:</div></td><td><input type="text" name="last_name" maxlength="50" value="<? echo $form->value("last_name"); ?>"></td><td><? echo $form->error("last_name"); ?></td></tr>
<tr>
  <td><div align="right">Mother's Maiden Name:</div></td><td><input type="text" name="surname" maxlength="50" value="<? echo $form->value("surname"); ?>"></td><td><? echo $form->error("surname"); ?></td></tr>
<tr><td><div align="right">Security Code:</div></td><td><input id="security_code" name="security_code" type="text" /></td><td><? echo $form->error("security_code"); ?></td></tr>
<tr><td> </td>
<td><img src="admin/CaptchaSecurityImages.php" /></td><td> </td>
</tr>
<tr>
  <td> </td>
  <td><div align="center">
    <input type="hidden" name="subjoin" value="1">
<input type="submit" value="Join!">
  </div></td>
  <td> </td>
</tr>
</table>
</form>

<?
}
?>

Link to comment
Share on other sites

Hi,

 

I have a couple of forms that are not working correctly, but only in IE.  The forms work fine in Safari and in Firefox.  I also have used these forms in the past on another site and those work correctly in IE.  I am really stumped on this.

 

Can anyone take a look at this and see what I have done wrong.

 

The forms can be found at:

 

http://www.thehealthjournals.com/register.php

http://www.thehealthjournals.com/forgotpass.php

 

And these same forms working correctly in IE (different layout and CSS) can be found at:

 

http://www.nothingaboutnothing.com/admin/register.php

http://www.nothingaboutnothing.com/forgotpass.php

 

Thanks.

 

I highly doubt this is a PHP issue, this is more related to CSS/HTML. php does not have anything to do with the client side other than providing data.

Link to comment
Share on other sites

I highly doubt this is a PHP issue, this is more related to CSS/HTML. php does not have anything to do with the client side other than providing data.

 

This is NOT a php issue.

 

Ok, sorry.  I tried verifying the markup in DW, and it said no errors.  But I then checked with another validator online and it had a bunch of errors.  But I am not sure how to fix them.

 

Thanks anyways.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.