Link to home
Start Free TrialLog in
Avatar of NatashaMac
NatashaMac

asked on

different views for IE7 and IE8

Hi i have created a form and it is showing a different view how can i fix this so the IE7 view is the same as the IE 8 .  See attached views and code

Thanks
Natasha
<?php
        /** Session Variables **/
        session_start();
        ob_start();
        
if( isset($_POST) && !empty($_POST) )
{
           /**recaptcha**/
		
		require_once('recaptchalib.php');
$privatekey = "6LdwTgwAAAAAAIDQSOspBiMF4yapRbdYSuJfEZI6";
$resp = recaptcha_check_answer ($privatekey,
$_SERVER["REMOTE_ADDR"],
$_POST["recaptcha_challenge_field"],
$_POST["recaptcha_response_field"]);
if (!$resp->is_valid) {
die ("The reCAPTCHA wasn't entered correctly. Go back and try it again." .
"(reCAPTCHA said: " . $resp->error . ")");
}
		   
		    /** Include Files **/
            require 'admin/conf.php';
    
    // validation should start here:
    
    $error_message = '';
    if (empty($_POST['forename']) || preg_match('/[^A-Z .]+/i',$_POST['forename'])) {
      $error_message = 'Invalid forname, please enter a correct one.';
    }
    if (empty($_POST['surname']) || preg_match('/[^A-Z .]+/i',$_POST['surname'])) {
      $error_message = 'Invalid surname, please enter a correct one.';
    }
    // checking email:
    if (empty($_POST['email']) || !preg_match("/^[^\s()<>@,;:\"\/\[\]?=]+@\w[\w-]*(\.\w[\w-]*)*\.[a-z]{2,}$/i",$_POST['email'])) {
      $error_message = 'Invalid email, please enter a correct one.';
    }
    // checking phone number
    if (empty($_POST['phone']) || preg_match('/[^0-9\- ]+/',$_POST['phone'])) {
      $error_message = 'Invalid phone, please enter a correct one.';
    }
    
    // if error_message is empty, perform the actions below
    if (empty($error_message)) {
    
        $sql = "select * from admin_user"; 
         
        $res = mysql_query($sql); 
         
        $row = mysql_fetch_array($res); 
         
        $mailto = 'nmcdonald@acornsolutions.ie'; 
         
        $from = $_POST['email']; 
         
        $mailsubject = "Newsletter subscription "; 
         
        $message =$_POST['forename']. " " .$_POST['surname']. " has subscribed for the newsletter \n\n\nForename :  ".$_POST['forename']."\nSurname : ".$_POST['surname']."\nTelephone No : ".$_POST['phone']."\nEmail : ".$_POST['email']. "\n\nRegards, \n naturalstonecarpet.ie";
        
         
        $headers = "From: ". $from."\r\n"; 
          
        $mail = mail($mailto,$mailsubject,$message,$headers); 
         
        if(!$mail) { 
            $error_message = 'Failed to send the email, please try again, if problem persists contact with us.'; 
        }
        
        // continue if error message is empty, means you sent the mail
            if (empty($error_message)) {
                    /** Functionality **/
            
              
                     $sqlins = "insert into newsletter (`newsletter_id`, `forename`, `surname`, `phone`,`email`, `timestamp`) values ('".mysql_escape_string($_POST['brochure_id'])."', '".mysql_escape_string($_POST['forename'])."', '".mysql_escape_string($_POST['surname'])."', '".mysql_escape_string($_POST['phone'])."', '".mysql_escape_string($_POST['email'])."', '".date("Y-m-d H:i:s")."')"; 
            
                            $resins = mysql_query($sqlins) or die(mysql_error());
                            if(!$resins)
                                    $error_message = 'Unable write data to database, please try again. If problem persists, please contact with us!';
            
                            // if error message is empty, that means every thing is ok, then redirect to download page:
                            if (empty($error_message)) {
                                header("Location: download-brochure.php?msg=1");
                                exit;
                            }
            }
    }		

}

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="title" content="Natural stone flooring, flooring suppliers, home flooring, commercial flooring, stone carpet - Natural Stone Carpets FAQs">
<meta name="keywords" content="Natural stone flooring, flooring suppliers, home flooring, commercial flooring, stone carpet">
<meta name="description" content="Natural stone flooring, flooring suppliers, home flooring, commercial flooring, stone carpet in Ireland and UK">
<meta name=" abstract " content="Ireland and UK Natural stone flooring, flooring suppliers, home flooring, commercial flooring, stone carpet">

<meta name="robots" content="index, follow">
<meta name="author" content="naturalstonecarpets.ie">
<meta name="home_url" content="http://www.naturalstonecarpets.ie">
<meta name="classification" content="Natural stone flooring, flooring suppliers, home flooring, commercial flooring, stone carpet">
<meta name="revisit-after" content="7 days">
<meta name="language" content="English">
<meta name="charset" content="ISO-8859-1">
<meta name="distribution" content="Global">
<meta name="rating" content="General">
<meta name="expires" content="Never">

<title>Stone Carpet - Home & Commercial Flooring - FAQs</title>
<link href="nsc-styles.css" rel="stylesheet" type="text/css" media="all" />
<link rel="stylesheet" href="sIFR-screen.css" type="text/css" media="screen" />
<link rel="stylesheet" href="sIFR-print.css" type="text/css" media="print" />

<script src="sifr.js" type="text/javascript"></script>
<script src="sifr-addons.js" type="text/javascript"></script>
<script src="sifr-test.js" type="text/javascript"></script>
<style type="text/css">
<!--
.style1 {font-size: 16px}
-->
</style>

<script type="text/JavaScript">
<!--
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_validateForm() { //v4.0
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
    if (val) { nm=val.name; if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
        if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
      } else if (test!='R') { num = parseFloat(val);
        if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=test.substring(8,p); max=test.substring(p+1);
          if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
    } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
  } if (errors) alert('The following error(s) occurred:\n'+errors);
  document.MM_returnValue = (errors == '');
}
//-->
</script>
</head>
<body>
<table id="pagewidth" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td id="header" colspan="3"><div id="banner"><img class="logo" src="images/nsc-logo.jpg" alt="Natural Stone Carpets" />
	<table width="200" border="0" class="original">
          <tr>
            <td align=""><img src="images/call_us_sample.gif"/></td>
            <td><span class="style1"><font size="6px" face="Times New Roman, Times, serif" color="#fffac5">call us</font></span></td>
          </tr>
          <tr>
            <td colspan="2"><span class="style1"><font size="+1" color="#fffac5" face="Times New Roman, Times, serif">+ 353 1 8900111</font></span></td>
          </tr>
        </table></div></td>
  </tr>
  <tr>
    <td class="content" width="180" valign="top"><div id="nav">
        <ul>
          <li><a href="index.html"><font color="#fff3b2" size="3px" face="Georgia, Times New Roman, Times, serif"><strong>Home</strong></font></a></li>
          <li><a href="about.html"><font color="#fff3b2" size="3px" face="Georgia, Times New Roman, Times, serif"><strong>Natural Stone Carpets</strong></font></a></li>
		  <li><a href="stone-carpet-marble.html"><font color="#fff3b2" size="3px" face="Georgia, Times New Roman, Times, serif"><strong>Marble Stone Carpets </strong></font></a> <font color="#FF0000"><strong><em>&nbsp;&nbsp;<img src="images/newicon.gif" /></em></strong></font></li> 
          <li><a href="home-flooring.html"><font color="#fff3b2"  size="3px" face="Georgia, Times New Roman, Times, serif"><strong>Home Flooring</strong></font></a></li>
		  <li><a href="commercial-flooring.html"><font color="#fff3b2"  size="3px" face="Georgia, Times New Roman, Times, serif"><strong>Commercial Flooring</strong></font></a></li>
          <li><a href="gallery.html"><font color="#fff3b2"  size="3px" face="Georgia, Times New Roman, Times, serif"><strong>Gallery</strong></font></a></li>
          <li><a href="testimonials.html"><font color="#fff3b2"  size="3px" face="Georgia, Times New Roman, Times, serif"><strong>Client Testimonials</strong></font></a></li>
          <li><a href="faqs.html"><font color="#1fe4e5"  size="3px" face="Georgia, Times New Roman, Times, serif"><strong>FAQs</strong></font></a></li>
          <li class="last"><a href="contact.html"><font color="#fff3b2"  size="3px" face="Georgia, Times New Roman, Times, serif"><strong>Contact Us</strong></font></a></li>
        </ul>
      </div>
      <div class="left-button"><a href="6reasons.html"><img src="images/6-reasons.gif" alt="5 Reasons to choose a Natural Stone Carpet" width="150" height="60" /></a></div>
      <div class="left-button"><a href="download.html"><img src="images/pdf-download.gif" alt="Download a PDF Brochure" width="150" height="60" /></a></div>
      <div class="left-button"><a href="http://ie.linkedin.com/in/christopherhyland"><img src="images/natural_stone_link_in.gif" border="0"/></a></font></div></td>
    <td class="content" width="410" valign="top">
      <div id="inside">
		  <h1>Subscribe to our newsletter </h1>
		  <img src="images/shopfloor.jpg" alt="Detail of a Carpet" width="400" height="160" />
	    <p><table width="500" border="0" align="center" >
        <form action="<?php echo $_SERVER['PHP_SELF'] ?>" method="post" >
          <tbody>
            <tr>
              <td colspan="2" align="center" valign="top"><strong>
                <?php if($_GET['msg'] == "1") { ?>
                Your subscription has been successfull.
				<br /><br /><br /><br />
                <?PHP } else {
                if (!empty($error_message)) { 
                    echo $error_message;
                }
            } ?>
              </strong></td>
              </tr>
            <tr>
              <td width="129" align="right" valign="top"><p class="style43">First Name
                </p>
              </p>                </td>
              <td width="261" align="left"><input name="forename" onsubmit="MM_validateForm('forename','','R');return document.MM_returnValue" size="20"  /></td>
            </tr>
            
            <tr>
              <td align="right" valign="top"><p class="style43">Surname</span></td>
              <td align="left"><input name="surname" onsubmit="MM_validateForm('surname','','R');return document.MM_returnValue" size="20" /></td>
            </tr>
            
            <tr>
              <td align="right" valign="top"><p class="style43">Phone No:</td>
              <td align="left"><input name="phone" onsubmit="MM_validateForm('phone','','RisNum');return document.MM_returnValue"   size="20"  /></td>
            </tr>
            
            <tr>
              <td height="29" align="right" valign="top"><p class="style43">E-mail</span></td>
              <td height="29" align="left"><span class="style35" style=" font-size:12px">
                <input name="email" onsubmit="MM_validateForm('email','','RisEmail');return document.MM_returnValue" size="20" />
              </span></td>
            </tr>
            
            <tr>
              <td height="29" colspan="2" align="left" class="style35" style=" font-size:12px"><?php
require_once('recaptchalib.php');
$publickey = "6LdwTgwAAAAAADwuqKF4CZ1ddJoDrhwMkhmopqDL"; // you got this from the signup page
echo recaptcha_get_html($publickey);
?></td>
            </tr>
            <tr>
              <td height="29" colspan="2" align="center" class="style35" style=" font-size:12px"><span class="style35" style=" font-size:12px">
                <input value="Submit" type="submit" name="brochure" id="brochure" />
              </span></td>
            </tr>
          </tbody>
        </form>
</table>


	    </p>
        </div>
    <td class="content" width="180" valign="top"><div class="left-button"><a href="quote.php"><img src="images/quotebtn.jpg" alt="get a quote" width="147" height="54" border="0" /></a></div><div class="left-button"><a href="newsletter.php"><img src="images/newsletterbtn.jpg" alt="sign up for the newsletter" width="147" height="54" border="0" /></a></div>
      <div id="rightcol">
      <div id="rightcol">
        <div class="right-article">
          <h3>Visit our Showroom</h3>
          <p>Natural Stone Carpets Ltd,<br />
            Unit 8, Site 1,<br />
            Swords Business Park,<br />
            Swords,<br />
            Co. Dublin.</p>
          <img src="images/arrow-on-white.gif" alt="#" width="9" height="12" /><a href="location.html">View a Location Map</a> </div>
        <div class="right-article-last">
          <h3>How does it work? </h3>
          <p>Find out about the process
            involved in fitting a Natural
            Stone Carpet.</p>
          <img src="images/arrow-on-white.gif" alt="#" width="9" height="12" /><a href="process.html">The Process </a> </div>
      </div></td>
  </tr>
  <tr>
    <td id="footer" colspan="3"><ul>
        <li>&copy; Natural Stone Carpets 2010 - Stone Carpet </li>
        <li><a href="sitemap.html">Site Map</a></li>
        <li><a href="privacy.html">Privacy Policy</a></li>
		<li>Site Designed by<a href="http://www.redsky.ie/"> Red Sky</a></li>
      </ul></td>
  </tr>
</table>


<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-4552857-17");
pageTracker._trackPageview();
} catch(err) {}</script>

</body>
</html>

Open in new window

IE7-viewgif.gif
IE8-view.png
Avatar of gtworek
gtworek
Flag of Poland image

You may order IE8 to emulate IE7. Look at http://msdn.microsoft.com/en-us/library/cc288325(VS.85).aspx for details and html code samples.
Avatar of NatashaMac
NatashaMac

ASKER

That doesnt give me an awfull lot of help really
ASKER CERTIFIED SOLUTION
Avatar of s8web
s8web

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial