2 Replies Latest reply on Nov 17, 2008 7:47 AM by webdiva3001

    what is happening in safari/firefox?

    malcster2 Level 1
      the problem is, whenever i successfully login in to my site in safari or firefox, the sites display completely cocks up.
      the link is http://www.bwise-webdevelopment.co.uk/index2.php
      i have set up a domain password for you to test, domain is adobetest.co.uk, the password is adobe

      the php code is :


      if(isset($_POST['Submit'])) //if submit button is pressed for a new login

      $server = "localhost";
      $user = "xxxx";
      $password = "xxxx";
      $database = "xxxx";
      $gotdomain = $_POST['Domain'];
      $gotpass = $_POST['Password'];

      $db_handle = mysql_connect($server, $user, $password);
      $db_found = mysql_select_db($database, $db_handle);

      $sql = "select * from clients WHERE domain = '$gotdomain' AND password = '$gotpass'"; //match up data to login/password

      $result = mysql_query($sql);

      while ($db_field = mysql_fetch_assoc($result))
      $_SESSION['sescompany'] = $db_field['company'];
      $_SESSION['sessite'] = $db_field['website'];
      $_SESSION['sesemail'] = $db_field['email'];
      $_SESSION['sescmspass'] = $db_field['CMSPassword'];

      $count=mysql_num_rows($result); //find if row is returned

      if($count==1) //if a record of username/password is found
      $_SESSION['sesdomain'] = $gotdomain;
      $strwelcolm = "welcolm ".$_SESSION['sesdomain'];
      echo "<div id = 'logintext'>" .$strwelcolm. "</div>";
      $strwelcolm = "invalid username/password"; //if username/password is not found
      echo "<div id = 'logintext'>" .$strwelcolm. "</div>";


      if($_SESSION['sesdomain']) //if submit button is not pressed, check if a valid username/password has been entered
      $strwelcolm = "welcolm ".$_SESSION['sesdomain'];
      echo "<div id = 'logintext'>" .$strwelcolm. "</div>";



      the site, php etc works fine in explorer. if i login successfully, it cocks up. if i go to another page, everything looks fine in all browsers.

      hope you can help